You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { Config } from 'apollo-server-core';
import { formatArgumentValidationError } from 'type-graphql';
const options: Config = {
formatError: formatArgumentValidationError
};
Run compiling
tsc index.ts
index.ts:5:3 - error TS2322: Type '(err: GraphQLError) => { [key: string]: any; }' is not assignable to type '(error: GraphQLError) => GraphQLFormattedError'.
Type '{ [key: string]: any; }' is missing the following properties from type 'GraphQLFormattedError': message, locations, path
5 formatError: formatArgumentValidationError
~~~~~~~~~~~
node_modules/apollo-server-core/dist/graphqlOptions.d.ts:10:5
10 formatError?: (error: GraphQLError) => GraphQLFormattedError;
~~~~~~~~~~~
The expected type comes from property 'formatError' which is declared here on type 'Config'
Found 1 error.
Expected behavior
Code compiled without errors
Enviorment (please complete the following information):
OS: Mac
Node v10.15.1
Package version 0.16.0
TypeScript version 3.3.3333
The text was updated successfully, but these errors were encountered:
Describe the bug
formatArgumentValidationError doesn't align to apollo formatError
To Reproduce
index.ts
with such contentExpected behavior
Code compiled without errors
Enviorment (please complete the following information):
The text was updated successfully, but these errors were encountered: