dotansimha / dotansimha/graphql-code-generator-community

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

Open
#204 3 comments 6 reactions 1 assignee Claimed by @akhdefault View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

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

graphql-request supports [batching](https://github.com/prisma-labs/graphql-request#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).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.