-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Do not add default scalar if already exists #193
Comments
Great point! Thanks! Please try the new version, it will be published from minute to minute. |
🎉 This issue has been resolved in version 7.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks a lot for the very quick fix! 🎉🍻 |
Hi @nodkz , I think the problem still exists. By printing the
|
Schema keeps one type in Registry several times under the different keys - type name as string, type as GraphQL, type as TypeComposer. It helps to get the same type under different keys and not duplicate them. So your output log is correct. Maybe problem somewhere else. What specific case does not work for you? |
@nodkz Sorry for the late reply. You are correct, I have miss-looked the
But I have checked that the composer only have these types related to JSON:
And here is the full list (
|
I have confirmed that there are two versions of JSON types had been passed to the |
Looks like it was coming from the I have renamed my JSON scalar to
|
You may add your JSON to the |
Thanks very much for the help! 🎉🍻 |
Motivation
I am planning to use
graphql-compose
to enhancetype-graphql
generated schema.The generated schema already includes a set of
GraphQLScalarType
, which are duplicated with the set of default scalars.However, I would suggest do not provide default scalar types at all, since I would expect this package provides helper functions to enhance my existing schema, but not changing any definitions implicitly. For instance, my schema may expect a different
DateScalarType
parse and/or serialise implementation.The text was updated successfully, but these errors were encountered: