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

Custom directives #109

Closed
japrogramer opened this issue Jul 18, 2019 · 3 comments
Closed

Custom directives #109

japrogramer opened this issue Jul 18, 2019 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@japrogramer
Copy link

japrogramer commented Jul 18, 2019

I need a way to declare custom directives.

@key (fields: ...)
@external
@requires(fields: ...)

for reference this is how some of graphql-python's directives are declared
https://github.com/graphql-python/graphql-core/blob/master/graphql/type/directives.py

@patrick91 patrick91 added enhancement New feature or request help wanted Extra attention is needed labels Jul 18, 2019
@Kerl1310
Copy link
Contributor

Kerl1310 commented Oct 4, 2019

I'd be willing to look into this

@patrick91
Copy link
Member

@Kerl1310 nice! this seems to be a non easy task, so happy to see someone wanting to contribute :)

I was trying to create directives for apollo federation here: #115

but I noticed that graphql-core doesn't support server directives, so I think we'd need to extend graphql-core for that

@patrick91
Copy link
Member

Support for schema directives has been available for quite a while now: https://github.com/strawberry-graphql/strawberry/blob/master/CHANGELOG.md#0140---2019-08-14

We also have experimental support for federation, so I think we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants