graphql / graphql-js

A reference implementation of GraphQL for JavaScript
http://graphql.org/graphql-js/
MIT License
20.04k stars 2.02k forks source link

Introspection queries don't support `@oneOf` #4077

Closed maciesielka closed 3 months ago

maciesielka commented 5 months ago

Related to the issue in https://github.com/graphql/graphql-js/issues/3968, it doesn't appear that the introspection query is selecting the isOneOf field from the server, as defined by the RFC.

This has downstream effects like preventing this introspection response from powering codegen that uses that flag to enforce mutual exclusivity amongst the arguments.

I've attempted to add this functionality in https://github.com/graphql/graphql-js/pull/4078

JoeM1990 commented 4 months ago

In connection with the problem in #3968, it doesn't seem that the RFC-defined isOneOf field is being selected from the server by the introspection query.

This has side effects, such as stopping codegen that utilizes that flag to impose mutual exclusivity among the arguments from being powered by this introspective answer.

I've tried to incorporate this feature into #4078.

JoviDeCroock commented 4 months ago

What do you mean precisely @JoeM1990 it is defined here that isOneOf is a valid field on an input-object