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
It looks like currently the printSchema function doesn't have any handling for @oneOf.
I'm not sure if this is intentional or not, because I know printing directives has historically been a controversial topic, but my expectation would be that for directives that are part of the spec and have a corresponding option in the options when creating the type/field in code (eg deprecationReason/@deprecated ) would be printed when using printSchema.
Thanks for spotting this! Can confirm that the RFC definitely states the directive should be present; this isn't "metadata" (unlike graphql/graphql-spec#300) - it's a concrete __Type.isOneOf introspection field and without this we'd lose introspection<->SDL equivalence.
It looks like currently the
printSchema
function doesn't have any handling for@oneOf
.I'm not sure if this is intentional or not, because I know printing directives has historically been a controversial topic, but my expectation would be that for directives that are part of the spec and have a corresponding option in the options when creating the type/field in code (eg
deprecationReason
/@deprecated
) would be printed when usingprintSchema
.I'm happy to make a PR to add this, and it looks like it should be a pretty simple fix handled here: https://github.com/graphql/graphql-js/blob/main/src/utilities/printSchema.ts#L207C5-L207C5
The text was updated successfully, but these errors were encountered: