Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Federation] Add queryHash to GraphQLExecutor
Currently due to core-package not allowing queryHash You have the following error when building an ApolloGateway with Typescript. Property 'executor' in type 'ApolloGateway' is not assignable to the same property in base type 'GraphQLService'. Type '<TContext>(requestContext: WithRequired<GraphQLRequestContext<TContext>, "document" | "operation" | "queryHash">) => Promise<GraphQLExecutionResult>' is not assignable to type 'GraphQLExecutor<Record<string, any>>'. Types of parameters 'requestContext' and 'requestContext' are incompatible. Type 'WithRequired<GraphQLRequestContext<Record<string, any>>, "document" | "operationName" | "operation">' is not assignable to type 'WithRequired<GraphQLRequestContext<Record<string, any>>, "document" | "operation" | "queryHash">'. Type 'WithRequired<GraphQLRequestContext<Record<string, any>>, "document" | "operationName" | "operation">' is not assignable to type 'Required<Pick<GraphQLRequestContext<Record<string, any>>, "document" | "operation" | "queryHash">>'. Property 'queryHash' is optional in type 'GraphQLRequestContext<Record<string, any>> & Required<Pick<GraphQLRequestContext<Record<string, any>>, "document" | "operationName" | "operation">>' but required in type 'Required<Pick<GraphQLRequestContext<Record<string, any>>, "document" | "operation" | "queryHash">>'.ts(2416) By allowing queryHash this should be fixed.
- Loading branch information