Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for directives #148

Open
NPellet opened this issue Jul 29, 2024 · 0 comments
Open

Better support for directives #148

NPellet opened this issue Jul 29, 2024 · 0 comments

Comments

@NPellet
Copy link

NPellet commented Jul 29, 2024

In the current situation, directives can only be passed at the top-level query. However in practice, https://graphql.org/learn/queries/#directives shows clearly that directives can be used for any field of the gql query.

I would propose, during serialisation of the gql query, to check for

type Directive interface {
  Directive() string
}

for every type, and, if the interface is fulfilled, add the directive to the query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant