graphql-inspector
graphql-inspector copied to clipboard
Handle Scalar types
Scalar types are currently ignored when doing a diff check, should we handle them or not?
I guess we should, because when they change it is of course a breaking change. What do you think?
Hmm, I think we can skip scalars and only track how are they used in other GraphQL entities. For example, if JSON
scalar has been removed but hasn't been used in the schema, we don't need to warn about it.
The only breaking change I can see here is the Scalar's object definition (how it transforms input / output), but that's something on the "resolver" side of GraphQL server, we can't access that through Introspection or similar.
Generic function in GraphQL-js have this supported in diff: https://github.com/graphql/graphql-js/blob/master/src/utilities/findBreakingChanges.js#L499-L501