-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
enum resolver error on graphql-tools@4.0.0 #962
enum resolver error on graphql-tools@4.0.0 #962
Comments
Fix #962, Enum internal value mapping
This should now be fixed in |
I can get But it still prints |
I am not sure if I see the fix yet. Or is there something I am doing wrong here? Or does Apollo Server need to update it's dependencies? Here is a minimal repo. |
Ok, I can get it to work by upgrading to graphql-tools@4.0.2 and forcing apollo-server to use that version. I suppose we will just need apollo-server to update it's dependency versions, which looks like it was here apollographql/apollo-server@2abff34. |
For the following simple code
graphql-tools@3.1.1 & graphql@0.13.2 gave following output:
But with graphql-tools@4.0.0 & graphql@14.0.2, I got an unexpected result
If I returns 2 insteadof 1, I get
{ data: { test: 'ERROR' } }
.I think it is a bug of addResolveFunctionsToSchema.
enumValueMap[type.name] = { [fieldName]: resolverValue[fieldName] };
removes all fields except for the last one.I don't know what should I do if I want to get
{ status: 1 }
.The text was updated successfully, but these errors were encountered: