-
-
Notifications
You must be signed in to change notification settings - Fork 820
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
Custom scalars break when being stitched together by mergeSchemas #501
Comments
Thanks for reporting! For future reference: So the way it works is that in direct schema merging, we, naturally, want to preserve the scalars coming from subschemas (cause we can and they might be used internally). However, when you execute a subschema, you get the serialized result in your resolver, which is then broken because GraphQL expects a un-serialized result there. I'll update our tests to reflect that this is broken and think more on how to fix it. |
@freiksenet Just wondering if there is an update on this one? Or is there a work around to use custom scalars with |
Looks like it's fixed in v2.20.0 v2.19.0...v2.20.0 |
Are we sure it's fixed? Here's my
And my mergeSchema call:
But I still get:
Is there some other way I'm supposed to specify custom scalars? Thanks. Using 2.23.1. |
OK, not entirely fixed. If my schema is only:
then the scalar doesn't appear to be created, and I'm told it exists in the resolvers field but not in the types. If I have:
then everything works fine. |
I am still running into this issue. Is there any known work around? |
Should be fixed in graphql-tools-fork. |
We recently released an alpha version of GraphQL Tools (#1308) that should fix the issue. Please update
Let us know if it solves the problem, we're counting for your feedback! :) |
Possibly related #454, #486
Tried with the custom Date scalar example from https://www.apollographql.com/docs/graphql-tools/scalars.html#Date-as-a-scalar. It works when the whole schema is created using a single
makeExecutableSchema
. But when usingmergeSchemas
it throwsvalue.getTime is not a function
.Launchpad without
mergeSchemas
that works: https://launchpad.graphql.com/mkwqx4l99Launchpad with
mergeSchemas
that doesn't work: https://launchpad.graphql.com/93ql188wrNot sure if this is expected behavior or a bug.
The text was updated successfully, but these errors were encountered: