Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"starwars" example currently broken #28

Open
dsoprea opened this issue Aug 29, 2016 · 4 comments
Open

"starwars" example currently broken #28

dsoprea opened this issue Aug 29, 2016 · 4 comments

Comments

@dsoprea
Copy link

dsoprea commented Aug 29, 2016

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.

@amkoehler
Copy link

#29 fixed this for me. Has not been merged yet.

@dsoprea
Copy link
Author

dsoprea commented Oct 28, 2016

#29 is a duplicate of #27. There's a few of us sitting on #27.

@amkoehler
Copy link

That's a more complete solution too. Thanks for the heads up.

@dsoprea
Copy link
Author

dsoprea commented Oct 28, 2016

In the obscure case of them actually progressing, it can't hurt to emphasize a specific bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants