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

[typescript-graphql-request] Add support for graphql-request's native batching solution. #204

Open
kratam opened this issue Jul 8, 2022 · 3 comments
Assignees

Comments

@kratam
Copy link

kratam commented Jul 8, 2022

Is your feature request related to a problem? Please describe.

graphql-request supports batching, but it cannot be used with the sdk.

Describe the solution you'd like

The plugin should generate a batched version of the queries, e.g. sdk.queryNameBatch where the first parameter is an array instead of an object.

Describe alternatives you've considered

I can create a client directly by using GraphQLClient from graphql-request and call client.batchRequests( [ { document: QueryDocumentFromGeneratedFile } ] ) but it's not ideal (I have to manually set the return type of the method).

@charlypoly charlypoly self-assigned this Aug 1, 2022
@dotansimha dotansimha transferred this issue from dotansimha/graphql-code-generator Feb 5, 2023
@akhdefault
Copy link

Can we discuss any progress on this?

@saihaj
Copy link
Collaborator

saihaj commented Sep 26, 2023

do you want to take this task @akhdefault ?

@akhdefault
Copy link

Yes, but I would probably need some guidance as to how it could be approached; I'll take a look around and let you know of it's clear to me how one would do this.

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

No branches or pull requests

4 participants