dennys-bd / goals Goto Github PK
View Code? Open in Web Editor NEWGoals is a Golang/GraphQL Web Framework
License: MIT License
Goals is a Golang/GraphQL Web Framework
License: MIT License
Create version tags, and adjust the graphql packages used version as well
2018/07/20 12:20:10 graphql: panic occurred: runtime error: invalid memory address or nil pointer dereference
goroutine 48 [running]:
bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/log.(*DefaultLogger).LogPanic(0x1773ba8, 0x171b800, 0xc420206720, 0x1448e60, 0x1748a20)
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/log/log.go:21 +0x77
bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec.execFieldSelection.func2.1(0xc4201da1e0, 0x171b800, 0xc420206720, 0xc420053ef8, 0xc42020d3c0)
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec/exec.go:161 +0x87
panic(0x1448e60, 0x1748a20)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/panic.go:491 +0x283
bitbucket.com/bemind/ang-gateway/app/resolver.ConnectToAPI(0x14caf3e, 0x3, 0xc4202e0540, 0x2d, 0xc42020a140, 0xc42020a148, 0x1403300, 0xc42020d480, 0x0, 0x0, ...)
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/app/resolver/helper.go:49 +0x382
bitbucket.com/bemind/ang-gateway/app/resolver.get(0xc4202e0540, 0x2d, 0xc42020a140, 0xc42020a148, 0x1403300, 0xc42020d480, 0x2d, 0xc420040960, 0x1010bc3)
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/app/resolver/helper.go:70 +0x7f
bitbucket.com/bemind/ang-gateway/app/resolver.(*userResolver).Deals(0xc42020a120, 0x171b800, 0xc420318f90, 0xf00000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/app/resolver/users.go:129 +0x47f
reflect.Value.call(0x1495be0, 0xc4202067f8, 0xa93, 0x14cb148, 0x4, 0xc420318fc0, 0x2, 0x2, 0xc420206720, 0xc420318fc0, ...)
/usr/local/Cellar/go/1.9.2/libexec/src/reflect/value.go:434 +0x905
reflect.Value.Call(0x1495be0, 0xc4202067f8, 0xa93, 0xc420318fc0, 0x2, 0x2, 0xa93, 0x2, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/reflect/value.go:302 +0xa4
bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec.execFieldSelection.func2(0xc4201da1e0, 0x171b800, 0xc420206720, 0xc42020d3c0, 0xc420202f00, 0xc420053f40, 0x171b800, 0xc420318f90, 0x0)
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec/exec.go:183 +0x3c7
bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec.execFieldSelection(0x171b800, 0xc420206720, 0xc4201da1e0, 0xc420202f00, 0xc42020d3c0, 0x1)
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec/exec.go:193 +0x1b7
bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec.(*Request).execSelections.func1(0xc4203168e0, 0xc4201da1e0, 0x171b800, 0xc420206720, 0xc42020c2a0, 0xc420202f00)
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec/exec.go:74 +0x16c
created by bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec.(*Request).execSelections
/Users/dennysazevedo/Workspace/go/src/bitbucket.com/bemind/ang-gateway/vendor/github.com/graph-gophers/graphql-go/internal/exec/exec.go:70 +0x4c3
To Goals architecture be more likely a mvc one the scaffold graphql should't create a modelResolver
by default then:
instead of
func (r *modelResolver) Field() {
return r.m.Field
}
scaffold should generate by default
func (m *Model) FIELD() {
return m.Field
}
Goals.toml is being created
[project]
name = inloco
import_path = github.com/dennys-bd/inloco
go_version = go1.11
app_mode = gateway
instead of
[project]
name = "inloco"
import_path = "github.com/dennys-bd/inloco"
go_version = "go1.11"
app_mode = "gateway"
Use Browsable API #8 auto to generate an admin.
Should not be a boilerplate instead, it should be done be the goals.
Create a pattern and deliver it to goals to use.
Create a default scalar type for handling files submission in a Goals app
This Scalar can't be created alone, the handle must be updated to accept a multipart request.
This handle should be used only if configurated in Goals.toml
to true
, default nil
Create an Browsable API much like Django Rest Framework do
Create an option to server the Browsable API instead of the graphiql page
goimports package should be used for beautify .go files under it's usual style guide
golang.org/x/tools/cmd/goimports
Every File created by goals init, scaffolding graphql and scaffolding auth that is a go file should be under go style
Use github pages to create a stating guide
Write a flag to goals init
command where the user can choose what should be the goals application directive(gateway or database), it should be saved in Goals.toml
application's file.
with request function and unmarshal response
Some models have the import keyword and shouldnt.
It occurs when the scarffold feature does not use time or id
goals s graphql task 'id:ID! title:string! done:boolean!'
model.go => one line imports without \n
resolver.go => ending with 2 \n | when using id type its creating like Id instead of ID
schema.go => write a better todo
Try to change graphql package to use struct's fields instead it's function to resolve a schema field
creating some new syntax for goals (the field will have the possibility to be resolved in 4 ways):
Schema:
type User {
id: ID!
docs: [String!]!
name: String!
links: [String]
}
Model:
type User struct {
ID graphql.ID
MyDocs []string `graphql:"docs"` // doesn't have the same name so I should use graphql tag
myName string // doesn't have the same name and isn't exported I should use a function
links *[]*string `graphql:"-"` // has the same name but for whatever reason I don't use the field, i should use a function with Resolver name Appended
}
func (u User) Name() string {
return u.myName
}
func (u User) LinksResolver() *[]*string {
return u.Links
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.