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 ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve mutation determination #3269

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Conversation

justin-tay
Copy link
Collaborator

Description

Instead of attempting to guess if the query text is amutationby checking the starting characters of the line parse theDocumentas theGraphQLEntityProjectionMakeris going to need it anyway to make theGraphQLProjectionInfo.It is then simple to check if themutationoperation is present in theDocument.

Motivation and Context

This for instance allows handling of cases where afragmentexists before themutation.

fragmentpostDataonPost{
id
title
text
author{
username
displayName
}
}
mutationaddPost($post:AddPostInput!) {
addPost(input:[$post]) {
post{
...postData
}
}
}

How Has This Been Tested?

Modified the appropriate unit tests.

License

I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@aklish aklish merged commit22387ac into yahoo:master Aug 8, 2024
2 checks passed
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.

2 participants