-
Notifications
You must be signed in to change notification settings - Fork 0
Improve input validation with visitor #26
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
Co-authored-by: Adam Petro <adam.petro@shopify.com>
776a5fd to
8dc30f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's squash these commits down either before merging or by using squash-and-merge
|
|
||
| const fragmentSpreadCount = node.selections.filter( | ||
| (selection) => | ||
| selection.kind == Kind.FRAGMENT_SPREAD || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry late comment but didn't we convert all the fragment spreads in the first step? why do we need this in this condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right that this could be removed, since everything should have converted to inline fragments during this call
| const inlineFragmentSpreadsAst = inlineNamedFragmentSpreads(queryAST); |
Part of https://github.com/shop/issues-shopifyvm/issues/660
Leverages graphql's visit to traverse the inputQueryAST