Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 3c26db7

Browse files
danielreardenIvanGoncharov
authored andcommitted
Fix type for extensions option
1 parent 4403bfc commit 3c26db7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ export type OptionsData = {|
125125
*
126126
* This function may be async.
127127
*/
128-
extensions?: (info: RequestInfo) => { [key: string]: mixed, ... },
128+
extensions?: (
129+
info: RequestInfo,
130+
) => { [key: string]: mixed, ... } | Promise<{ [key: string]: mixed, ... }>,
129131

130132
/**
131133
* A boolean to optionally enable GraphiQL mode.

types/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ export interface OptionsData {
120120
*
121121
* This function may be async.
122122
*/
123-
extensions?: (info: RequestInfo) => { [key: string]: unknown };
123+
extensions?: (
124+
info: RequestInfo,
125+
) => { [key: string]: unknown } | Promise<{ [key: string]: unknown }>;
124126

125127
/**
126128
* A boolean to optionally enable GraphiQL mode.

0 commit comments

Comments
 (0)