Skip to content

Conversation

@lopert
Copy link
Collaborator

@lopert lopert commented Oct 17, 2025

Part of https://github.com/shop/issues-shopifyvm/issues/660

Leverages graphql's visit to traverse the inputQueryAST

@lopert lopert marked this pull request as ready for review October 17, 2025 20:58
@lopert lopert requested a review from adampetro October 22, 2025 17:29
@lopert lopert force-pushed the ap.visitor-experiment branch from 776a5fd to 8dc30f0 Compare October 22, 2025 18:17
@lopert lopert requested a review from adampetro October 22, 2025 19:56
Copy link
Contributor

@adampetro adampetro left a 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

@lopert lopert merged commit bce0e70 into main Oct 23, 2025
1 check passed

const fragmentSpreadCount = node.selections.filter(
(selection) =>
selection.kind == Kind.FRAGMENT_SPREAD ||
Copy link
Contributor

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?

Copy link
Collaborator Author

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);

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.

3 participants