absinthe-graphql / absinthe

The GraphQL toolkit for Elixir
http://absinthe-graphql.org
Other
4.26k stars 525 forks source link

Support TypeSystem Directives #1003

Open binaryseed opened 3 years ago

binaryseed commented 3 years ago

The latest GraphQL spec includes TypeSystemDirective (directives that annotate the type system) alongside the ExecutableDirective (directives that annotate query execution)

https://spec.graphql.org/draft/#TypeSystemDirectiveLocation

Absinthe has full support for ExecutableDirectives, but only partial support for TypeSystemDirectives

kdawgwilk commented 3 years ago

Can I get more details on what support is missing for TypeSystemDirectives? I am looking at diving into this issue and would love any guidance.

binaryseed commented 3 years ago

One part of this (the SDL rendering) is accomplished in this PR: https://github.com/absinthe-graphql/absinthe/pull/1010

I've got more working, and will submit additional PRs.

Unfortunately, I don't have much guidance since I'm figuring this out as I go, and there's probably a bit of design work with the rest of the core team to get the rest of this in place.

binaryseed commented 3 years ago

One example of folks expecting Type System Directives to be available inside the resolver function: https://github.com/absinthe-graphql/absinthe/issues/964

binaryseed commented 3 years ago

FYI, there's a comment in ^^ that includes a bit of a workaround that would enable passing directive details via meta using hydrate