Skip to content

Replace '.getDirectives' with generic method #1436

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

Conversation

IvanGoncharov
Copy link
Member

@mjmahone It's PR on top of #1435 so it will be merged on your feature branch.

There some technical issues with #1435 but .getDirectives is a major one.
This PR shows that you don't need this function and could use generic one instead.
If you need this functionality for Relay we can figure out how to make generic function public.

Motivation: *.getDirectives conflicts with #1343 and more global effort to expose directives through introspection: graphql/graphql-spec#300
Also, we shouldn't add methods that are easily implemented as an external function or we will get a bunch of "god" classes.

@IvanGoncharov IvanGoncharov force-pushed the validate-schema-directives2 branch from 59687d8 to 57619c9 Compare July 27, 2018 05:02
Copy link
Contributor

@mjmahone mjmahone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this makes sense. Thank you for fixing it: I'll merge it into #1435, though I agree with you that there are issues. I'd rather wait the weekend for your (from the sound of it, better) PR than push #1435 through too quickly.

@mjmahone mjmahone merged commit a4c73af into graphql:validate-schema-directives Jul 27, 2018
@IvanGoncharov IvanGoncharov deleted the validate-schema-directives2 branch August 6, 2018 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants