-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Feature request: batchOperations #462
Comments
Sounds like all of this stuff would be implemented very easily in the web server itself, except for the So this is something someone could do as a plugin for either express-graphql or apollo-server with a little bit of work, to test it out - I'd say that would be the right way to start rather than adding it to the core implementation here right away. If you're interested in working on this, I can help you find the right tools to implement it. |
@reggi Apollo Server already has a way to send a batch of queries, the only thing it's missing is the |
This style of dependent batched query isn't supported yet and is not yet a priority relative to some of the other work happening now. I'm happy to leave this issue open for future consideration though. |
Thanks All! I'm excited for this feature, but It's not something I need right now. Would be super nice for testing. |
Would it be feasible to request
and
in parallel and then merge client-side based on story id? The server could cache the work done for Just a quick thought - felt it's worthwhile to think about a solution that does not require API/language changes. |
Another possible use case is for mutations. Take the output of one mutation to create an object A and pass the id allocated into a field for object B. Then you can create multiple objects in a single call, linking them together. The same |
Is this a priority yet? I see a PR here: graphql-python/graphql-core#99 Seems like a natural extension to allow sequential processing that is dependent on previous queries / mutation. My use case, and I suspect anyone who has ever dealt with a relational db (ie. a huge use case) is that people who want to create multiple dependent relationships in one query:
Currently this type of functionality is handled in a resolve function. However that seems totally unnecessary if the language can handle this type of sequential processing. We already know mutations happen sequentially, so theoretically under the hood, even before |
Has anyone been working on @helfer 's suggestion? ie. Implementing this as a standalone directive? |
Any updates? I want to do the same thing but i seems the current release doesn't support this feature. |
FYI, recently I added batch executor in Sangria: http://sangria-graphql.org/learn/#batch-executor It implements all of the functionality described in the talk, including Still collecting the feedback from the users. Hopefully, at some point, I will have enough info to share an update (pros/cons based on the user feedback). |
Any update on this? |
This is what we use in schema stitching it’s based on gatsby batch execution, transforms query to combine root fields wo conflicts, rather than send in array of operations no ‘export’ directive |
Any updates on this? :) |
1 similar comment
Any updates on this? :) |
I am going to close this old issue as it may not ever appear within this core library, although may be appropriate elsewhere. Now that we have independent transport specification protocols (GraphQL over HTTP, graphql-http, graphql-ws, graphql-sse, batching requests seems like something that should be discussed over there. If something more like incremental delivery is desired, we also have a separate sub-WG tracking that. Additional specification proposals for new options like could find a home at https://github.com/graphql/graphql-spec or https://github.com/graphql/graphql-wg . C.f. the resumable proposal at graphql/defer-stream-wg#96 ... We have complex utility functions more batching as above within the community, gatsby, graphql-tools, see discussion above. |
There are also more advanced caching solutions for graphql out as the years have gone by! |
From Lee's talk at React Eurpoe batch was mentioned as an experimental feature.
I'm curious when / if it's ever going to land in this project or if there's a plugin available today.
The text was updated successfully, but these errors were encountered: