-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
Default resolver for fields that are functions does not work when passing resolvers to mergeSchemas #1061
Comments
I managed to fix this issue by putting the resolvers in a makeExecutableSchema call that afterwards gets passed to mergeSchemas, rather than passing resolvers to mergeSchemas. |
This should be fixed in graphql-tools-fork v6.1.2. Let me know if you have any issues. |
We recently released an alpha version of GraphQL Tools (#1308) that should fix your issue. Please update
Let us know if it solves your problem, we're counting for your feedback! :) |
Rolled into #1306 |
So the default resolver should resolve the field name if it exists, and if the field name is a function, it should call that. However when passing a resolvers to mergeSchemas, the default resolver resolution does not happen for functions.
Expected result
If field is a function, function should be called and the return value of the function is assigned to the field.
Actual result
A type error
Int cannot represent non-integer value: [function fieldB]
This glitch shows the problem: https://glitch.com/edit/#!/intelligent-buckaroo
The text was updated successfully, but these errors were encountered: