Closed k4n4ry closed 1 year ago
fixes: #548
package main import ( "log" "net/http" graphql "github.com/graph-gophers/graphql-go" "github.com/graph-gophers/graphql-go/relay" ) type query struct{} func (_ *query) Hello(args struct{ ID *graphql.ID }) string { return "Hello, world!" } func main() { s := ` type Query { hello(id: ID!): String! } ` schema := graphql.MustParseSchema(s, &query{}) http.Handle("/query", &relay.Handler{Schema: schema}) log.Fatal(http.ListenAndServe(":8080", nil)) }
When running the above, the following error happen, and exit.
panic: field "ID" must be a non-pointer since the parameter is required
Thank you for your contribution!
fixes: #548
When running the above, the following error happen, and exit.