mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Add async function definition for extensions
This commit is contained in:
@@ -24,7 +24,8 @@ const graphqlOptionRequestAsync = async (request: express.Request): Promise<grap
|
||||
return {
|
||||
graphiql: true,
|
||||
schema: await Promise.resolve(schema),
|
||||
context: request.session
|
||||
context: request.session,
|
||||
extensions: async (args) => { }
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -54,7 +54,7 @@ declare namespace graphqlHTTP {
|
||||
* An optional function for adding additional metadata to the GraphQL response as a key-value object.
|
||||
* The result will be added to "extensions" field in the resulting JSON.
|
||||
*/
|
||||
extensions?: (args: ExtenstionsArgs) => any;
|
||||
extensions?: ((args: ExtenstionsArgs) => any) | ((args: ExtenstionsArgs) => Promise<any>);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user