relay
relay copied to clipboard
"starwars" example currently broken
I have a handler PR that's failing in Travis because of the starwars example. It looks like the signature of the type-resolver function (ResolveTypeFn) changed here.
The signature of ResolveTypeFn is now "(p ResolveTypeParams) *Object" but the function is currently defined as:
},
TypeResolve: func(value interface{}, info graphql.ResolveInfo) *graphql.Object {
// based on the type of the value, return GraphQLObjectType
switch value.(type) {
case *Faction:
As a result, the test is currently showing:
$ $HOME/gopath/bin/goveralls -service=travis-ci
exit status 2: # github.com/graphql-go/relay/examples/starwars
../relay/examples/starwars/schema.go:129: cannot use func literal (type func(interface {}, graphql.ResolveInfo) *graphql.Object) as type graphql.ResolveTypeFn in field value
FAIL github.com/graphql-go/handler [build failed]
I'm not in a place that I can currently fix it. I also risk destabilizing the example because I believe you can now get the content of the old value argument from the new p (ResolveTypeParams) argument but I am new to GraphQL and don't know that I can effectively test it before committing.
#29 fixed this for me. Has not been merged yet.
#29 is a duplicate of #27. There's a few of us sitting on #27.
That's a more complete solution too. Thanks for the heads up.
In the obscure case of them actually progressing, it can't hurt to emphasize a specific bug.