-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add capability to send multiple mutations in one request #205
Comments
Looking at |
Lets say that I have context menu where I can change many things about the image: its metadata, tags and groups. I like the idea of having several simple mutations with clear purpose rather than having one `updateImage' mutation which does everything based on args. I understand that I could trigger several mutations via separate requests, but its not optimal - it causes more data to send/receive and possibly more re-renders. GraphQL support that.. I would think that there was some flexibility reason for it. But also I can imagine that things can get complicated to handle that.. and they are pretty complicated already.. so also depends on complexity that it would bring... |
Relay does not currently support sending multiple mutations for a single request, but there isn't any reason we can't add support for it. |
This is definitely a nice to have, but we haven't seen strong demand for this feature. I'm going to close it due to inactivity, but feel free to comment here and we can reopen. |
We would love to see this too. |
so I cant do a mutation like this ?
That really hurts :( |
@Kareem3d: What would |
@wincent Now I have moved to Authorization header and removed the root query and things actually becoming much easier to manage but it just doesnt feel like a graphql way of authentication I think... |
@Kareem3d: It's conventional to pass auth tokens along at the network layer level, but outside the query itself (see this guide for an example). You can then pass information about the authorized user through to the field resolvers on the server via context. |
@yungsters @jardakotesovec Can you please add this capability, we need it for good reasons. In our project we create custom fields and then we need a way to batch update those fields, our backend already supports it but due to relay's incapability we are not able to do through ui. |
I don't think we have anything in Relay Modern that limits the number of root fields in a mutation. Have you tried this with Relay Modern (it will not work in classic/compat)? |
Thanks @josephsavona for replying, we are still on 0.8.2, will try to upgrade and let you know if find any issue. |
I thought I needed this, ended up implementing it with Relay Modern, and it worked. |
GraphQL make possible to post multiple mutation tasks in one request - is possible to do that with Relay?
The text was updated successfully, but these errors were encountered: