You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
What is the current behavior?
It's possible to create two SE's with the same Type in them, with a different definition. Both SE's will save correctly. Only the first Type definition is actually used.
Please share the relevant part of your GraphQL schema and all functions, permissions or other project settings for easier reproduction
SDL 1:
type MyPayload { someField: Int }
extend type Query {
add(a: Int! b: Int!): MyPayload
}
SDL 2:
type MyPayload { anotherField: Int }
extend type Query {
sum(a: Int! b: Int!): MyPayload
}
This breaks intellisense in the Playground, the Docs only show the first definition, but both queries work with the correct return field (someField for add, anotherField for sum)
What is the expected behavior?
The two payload definitions should either be merged (like with gql schema definitions), or the second SE should throw a validation error on save.
The text was updated successfully, but these errors were encountered:
We were not correctly checking for duplicate type names and duplicate function names in all cases. We fixed that and you will now get an error on trying to use the same name for two types or functions - even when they are created in the same deploy.
Issue by kbrandwijk
Thursday Aug 03, 2017 at 20:51 GMT
Originally opened as https://github.com/graphcool/api-bugs/issues/217
What is the current behavior?
It's possible to create two SE's with the same Type in them, with a different definition. Both SE's will save correctly. Only the first Type definition is actually used.
Please share the relevant part of your GraphQL schema and all functions, permissions or other project settings for easier reproduction
SDL 1:
SDL 2:
This breaks intellisense in the Playground, the Docs only show the first definition, but both queries work with the correct return field (
someField
foradd
,anotherField
forsum
)What is the expected behavior?
The two payload definitions should either be merged (like with gql schema definitions), or the second SE should throw a validation error on save.
The text was updated successfully, but these errors were encountered: