diff --git a/types/express-graphql/express-graphql-tests.ts b/types/express-graphql/express-graphql-tests.ts index c91f73029e..8c0b14d49d 100644 --- a/types/express-graphql/express-graphql-tests.ts +++ b/types/express-graphql/express-graphql-tests.ts @@ -24,7 +24,8 @@ const graphqlOptionRequestAsync = async (request: express.Request): Promise { } }; }; diff --git a/types/express-graphql/index.d.ts b/types/express-graphql/index.d.ts index 89a0a80ed8..166bdae6e7 100644 --- a/types/express-graphql/index.d.ts +++ b/types/express-graphql/index.d.ts @@ -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); };