Since upgrading from apollo-server-express 2.4.2 to 2.4.8 I have two typing issues with the ApolloServer config used in the constructor:
1.) I can't use the "formatError" from the apollo-erros package (version1.9.0) anymore. I get this error:
Type '(error: any, returnNull?: boolean) => ErrorInfo' is not assignable to type '(error: GraphQLError) => GraphQLFormattedError'. Type 'ErrorInfo' is not assignable to type 'GraphQLFormattedError'. Property 'locations' is optional in type 'ErrorInfo' but required in type 'GraphQLFormattedError'.
2.) I can't access the "connection" parameter anymore from the context creation function (it returns an "ExpressContext"). It's not a recognized parameter anymore.
But in the docs it's still the propesed way to create context for subscriptions: https://www.apollographql.com/docs/apollo-server/features/subscriptions.html#Context-with-Subscriptions
I have to stick with version 2.4.2 until this problem is resolved.
Thanks for any help.
Since upgrading from apollo-server-express 2.4.2 to 2.4.8 I have two typing issues with the ApolloServer config used in the constructor:
1.) I can't use the "formatError" from the apollo-erros package (version1.9.0) anymore. I get this error:
Type '(error: any, returnNull?: boolean) => ErrorInfo' is not assignable to type '(error: GraphQLError) => GraphQLFormattedError'. Type 'ErrorInfo' is not assignable to type 'GraphQLFormattedError'. Property 'locations' is optional in type 'ErrorInfo' but required in type 'GraphQLFormattedError'.
2.) I can't access the "connection" parameter anymore from the context creation function (it returns an "ExpressContext"). It's not a recognized parameter anymore.
But in the docs it's still the propesed way to create context for subscriptions: https://www.apollographql.com/docs/apollo-server/features/subscriptions.html#Context-with-Subscriptions
I have to stick with version 2.4.2 until this problem is resolved.
Thanks for any help.