sikanhe / gqtx

Code-first Typescript GraphQL Server without codegen or metaprogramming
458 stars 13 forks source link

directive examples #75

Open mfulton26 opened 9 months ago

mfulton26 commented 9 months ago

I see that directives can be passed into buildGraphQLSchema() but I haven't yet figured out how to use a directive on anything. e.g. I'd like to use @oneof on an Object Input Type or @key on an Object Type (for @apollo/subgraph).

Can some directive examples be added to the examples folder and/or to the README/docs?

mfulton26 commented 9 months ago

For reference on how @oneof would work: https://github.com/graphql/graphql-js/pull/3513