-
-
Notifications
You must be signed in to change notification settings - Fork 828
mergeSchemas cannot resolve scalar type in Query, Mutation if type is present by extend #847
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
Comments
After spend some more time investigate mergeSchemas function... Query, Mutation, and Subscription are being used prior to extensions being apply. |
@NattapongSiri EDIT: Oops, didn't realize that the package name was This issue is blocking my org's forward progress, so I'm going to be working on this until it gets fixed... |
https://github.com/grantwwu/graphql-tools-847-repro/ I have uploaded a minimal reproducing repository. |
mergeSchemas does not merge typedefs (!), it stitches them together by proxying. Merging can be done within makeExecutableSchema by just using an array of strings for typeDefs. See #443 (comment) |
define type by
then makeExectuableSchema out of it.
define another type
them mergeSchemas of both. Now it complain that it doesn't know Float.
workaround is to split second definition into extend and query then call mergeSchemas twice.
First with extend type definition. Second with Query.
Based on some of my investigation, mergeSchemas seem to detect type out of compile schema but not on string based schema. So split mergeSchemas into two phrase can workaround this.
This is possibly the same issue with #825 and #815
The text was updated successfully, but these errors were encountered: