It seems that custom directives don’t show up in the documentation in Apollo Studio. The custom directive is visible under “directives” but it doesn’t show up in the query fields / types. Directives like @deprecated do show up there.
I followed this guide Creating schema directives - Apollo GraphQL Docs
Code example: upper-case-directive - CodeSandbox
Anyone knows how to get this to work?
The reason is that the schema reference is built using introspection, which does not expose custom directives or their arguments at the location(s) where they’re used. This is a long-standing issue, which you can read about here.
@deprecated is the only server-side directive officially supported by the GraphQL spec, which is why it’s available via introspection and thus shows up in Apollo Studio. Introspection does show directive definitions, which is why they show up in “Directives”.
tl;dr - this won’t work until/unless the GraphQL spec (and implementations like GraphQL JS) supports exposing user-defined server-side directives via introspection
@mdecurtins thanks for your quick and clear explanation! Let’s hope it will be supported at some point in time.