Open mengledowl opened 12 months ago
@Directive("@oneof")
? 🤔
@MichalLytek Can you expand on your response or provide an example please? I'm running into this same issue, and the path forward on@oneOf
is unclear to me.
@Directive("@oneof")
is used to put schema directive on your input field, as the new graphql spec says.
Then you need a graphql runtime that supports this directive (new graphql-js does it) so it will apply runtime logic to your input type.
The GraphQL working group recently upgraded the
@oneOf
directive RFC (https://github.com/graphql/graphql-spec/pull/825) to RFC 2, which states:This is one of the most anticipated (IMO) new additions to the spec, and the work has already been done for
graphql-js
(though unreleased as of yet).I would like to propose that this feature be exposed in TypeGraphQL for those of us who want to have early access to it. I'm not sure what would be involved in that effort (if any), but wanted to get the conversation started.