We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The generated code collapses the different possible errors into a single error property in the response:
From the test spec:
graphql-codegen-apollo-next-ssr/test/index.spec.ts
Line 224 in 5370c8f
In that line of code:
data?.error
Apollo.ApolloError | undefined
data?.errors
ReadonlyArray<GraphQLError> | undefined
null
The resulting type should be a compound type of those possibilities. However, the generated code incorrectly types this as error?: Apollo.ApolloError:
error?: Apollo.ApolloError
Line 229 in 5370c8f
Expected Behavior
error
Apollo.ApolloError | readonly GraphQLError[] | null
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The generated code collapses the different possible errors into a single error property in the response:
From the test spec:
graphql-codegen-apollo-next-ssr/test/index.spec.ts
Line 224 in 5370c8f
In that line of code:
data?.error
is of type:Apollo.ApolloError | undefined
data?.errors
is of type:ReadonlyArray<GraphQLError> | undefined
null
The resulting type should be a compound type of those possibilities. However, the generated code incorrectly types this as
error?: Apollo.ApolloError
:graphql-codegen-apollo-next-ssr/test/index.spec.ts
Line 229 in 5370c8f
Expected Behavior
error
asApollo.ApolloError | readonly GraphQLError[] | null
.The text was updated successfully, but these errors were encountered: