Handle duplicate enums across services#2829
Conversation
006fde4 to
8ebd49d
Compare
8ebd49d to
8754e50
Compare
| const errors = validateSDL(definitionsDocument, schema, [matchingEnums]); | ||
| expect(errors).toMatchInlineSnapshot(` | ||
| Array [ | ||
| [GraphQLError: [serviceA] ProductType -> ProductType is an enum in [serviceA, serviceC], but not in [serviceB]], |
There was a problem hiding this comment.
This error could be clearer (the functionality is great)! Can we tell what kind of type it is in serviceB in this case? I.e. ProductType is an enum in [serviceA, serviceC], but is an object type in [serviceB]
There was a problem hiding this comment.
I'm not sure. What if there were multiple services with ProductType and one was an object type, and the other was a Scalar?
jbaxleyiii
left a comment
There was a problem hiding this comment.
@JakeDawkins this is so great! A few questions / nits and one request from me!
Can you add a test for internal representations (https://www.apollographql.com/docs/apollo-server/features/scalars-enums/#internal-values) and make sure that those don't have to be the same across services?
…l/jake/fed-duplicate-enums Handle duplicate enums across services Apollo-Orig-Commit-AS: apollographql/apollo-server@b635f17
Resolves #2767