99designs / gqlgen

go generate based graphql server library
https://gqlgen.com
MIT License
9.95k stars 1.17k forks source link

Codgen only directives are shown in introspection #2616

Open amiralies opened 1 year ago

amiralies commented 1 year ago

the definition of codegen only directives like goField and goTag are shown up in introspection.

note that the usage is omittd from fields but their definition are shown in the introspection.

christeredvartsen commented 10 months ago

The docs specify that they should not be exposed during introspection, but this is not correct as this issue specifies.

https://gqlgen.com/config/#inline-config-with-directives:

The builtin directives goField, goModel and goTag are automatically registered to skip_runtime. Any directives registered as skip_runtime will not exposed during introspection and are used during code generation only.

We are currently having an issue with this since we are trying to use federation with multiple backends which all use for instance the @goField directive.