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

documentation/question/feature: multiple mutations #1199

Open
xenoterracide opened this issue Aug 23, 2022 · 2 comments
Open

documentation/question/feature: multiple mutations #1199

xenoterracide opened this issue Aug 23, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@xenoterracide
Copy link

xenoterracide commented Aug 23, 2022

What are you missing in the docs

multiple mutations in a single transaction. Support for this seems to be all over the place in my google search for various frameworks. I mean doing something like this.

mutation first {
  someMutation {
     id: 123
  }
}
mutation second {
   someMutation {
      id: 456
   }
}

What would happen? can it be made to be a single transaction?

I know this is phrased as a question, but I always have the opinion, most questions, if not all can be answered by documentation ;). How to in the mutation would be nice. At the very least there should be some documentation of what happens.

@xenoterracide xenoterracide added the documentation Improvements or additions to documentation label Aug 23, 2022
@xenoterracide xenoterracide changed the title documentation: multiple mutations documentation/question/feature: multiple mutations Aug 23, 2022
@github-actions github-actions bot added the stale label Aug 24, 2023
@xmac11
Copy link

xmac11 commented May 10, 2024

Is there any update on this? Can multiple mutations be executed in a single transaction?

@srinivasankavitha
Copy link
Contributor

Hi - you can do multiple fields in one query or operation. If they have the same name, you will need to alias it as shown below.

query {
  A: hello
  B: hello(name:"wdqw")
}

If you want multiple query blocks in the same request, you will have to specify the operation name to execute in this transaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants