Skip to content

Commit 590d64d

Browse files
committed
add operationName
1 parent a02ea11 commit 590d64d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "batched-graphql-request",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"main": "dist/src/index.js",
55
"typings": "./dist/src/index.d.ts",
66
"files": [

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ export class BatchedGraphQLClient {
1818
async request<T extends any> (
1919
query: string,
2020
variables?: Variables,
21+
operationName?: string,
2122
): Promise<T> {
2223
const body = JSON.stringify({
2324
query,
2425
variables: variables ? variables : undefined,
26+
operationName: operationName ? operationName : undefined
2527
})
2628
return this.dataloader.load(body)
2729
}

0 commit comments

Comments
 (0)