-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
Resolver directives continuation #529
Conversation
@giautm opened a new PR so we can both push to the same one; I invited you to be a contributor! https://github.com/apollographql/graphql-tools/invitations
Never mind. I do think the directive should be on |
bcb1256
to
4adc122
Compare
@giautm thanks for your work! @stubailo thanks for merging it! I found several problems in the current implementation:
I fixed all of these issues in a separated package: graphql-directive. If we want Apollo Client to be compatible with directives in query we need to merge this PR. It fixes a cache issue. I think we could improve the current function by using graphql-directive implementation. What do you think? |
Hi @neoziro, there is my response:
Yep, your test throws an error for built-in directives. PS: I don't understand why you did not contribute to #518 while waiting to merge rather than creating a new module? |
@giautm thanks! I have to fix it for I did not contribute to #518 because I wanted to experiment and try it before merging it in this project. grahpql-tools is massively used and I want to be sure it is good before adding a new feature in this project. Also, I will talk about this in a Meetup and I wanted it to be public and usable before my talk. |
No, I don't think it's a good idea. Because there are a lot of directives from User if they want to add new. Your module will block them to do that. (by throwing an error). |
@giautm I am not sure. I think most of people are not using directives at all and it makes it easier to have a coherent setup. Do you know some projects that are already using custom directives? |
Please don't feel that this means we have to move slowly! I think as long as the feature isn't documented we can keep working on changing it. I'll add something to it that says "experimental" for now. |
#518 continuation
TODO: