graphql-inspector icon indicating copy to clipboard operation
graphql-inspector copied to clipboard

Handle Scalar types

Open martyganz opened this issue 6 years ago • 2 comments

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?

martyganz avatar Jan 02 '19 11:01 martyganz

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.

kamilkisiela avatar Jan 02 '19 16:01 kamilkisiela

Generic function in GraphQL-js have this supported in diff: https://github.com/graphql/graphql-js/blob/master/src/utilities/findBreakingChanges.js#L499-L501

wtrocki avatar Sep 17 '19 09:09 wtrocki