Skip to content

Commit 419ba9d

Browse files
committed
disable cache by default
1 parent a3cd49c commit 419ba9d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/BatchedGraphQLClient.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
Options,
3-
Variables,
4-
} from './types'
1+
import { Options, Variables } from './types'
52
import 'cross-fetch/polyfill'
63
import * as DataLoader from 'dataloader'
74
import { ClientError } from './ClientError'
@@ -14,7 +11,7 @@ export class BatchedGraphQLClient {
1411
constructor(uri: string, options?: Options) {
1512
this.uri = uri
1613
this.options = options || {}
17-
this.dataloader = new DataLoader(this.load)
14+
this.dataloader = new DataLoader(this.load, { cache: false })
1815
}
1916

2017
async request<T extends any>(

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface Options {
1313
}
1414

1515
export type HttpOptions = Options & {
16-
uri: string,
16+
uri: string
1717
}
1818

1919
export interface GraphQLError {

0 commit comments

Comments
 (0)