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

fix(Query validate: false) support skipping validation to live on the wild side #790

Merged
merged 1 commit into from
Jun 19, 2017

Conversation

rmosolgo
Copy link
Owner

You can save a few ms if you know for sure that your query is valid (eg, static queries which were validated in development/test, as with github/graphql-client)

If you run an invalid, lots of safeguards are thrown out the window:

  • Fields which should be hidden by only:/except: may be visible
  • Runtime errors will probably happen

The validation step involves a full visit to the AST, we can't skip that because we have to do a rewrite to InternalRepresentation. Soon, I will refactor that step to be static, so you can run it at build-time and never parse/visit the AST again :)

@rmosolgo rmosolgo merged commit aacf279 into master Jun 19, 2017
@rmosolgo rmosolgo deleted the validate-false branch June 19, 2017 16:07
@rmosolgo rmosolgo added this to the 1.6.4 milestone Jun 19, 2017
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

Successfully merging this pull request may close these issues.

None yet

1 participant