Skip to content

Commit 6786a94

Browse files
mhduboseabernix
authored andcommitted
Empty 'errors' list in introspection fix (#741)
* Fix for introspection when the client returns an empty errors list rather than null * Update introspection.ts
1 parent 4d1e55f commit 6786a94

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/apollo-language-server/src/schema/providers/introspection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class IntrospectionSchemaProvider implements GraphQLSchemaProvider {
3434
})
3535
)) as ExecutionResult<IntrospectionQuery>;
3636

37-
if (errors) {
37+
if (errors && errors.length) {
3838
// XXX better error handling of GraphQL errors
3939
throw new Error(errors.map(({ message }: Error) => message).join("\n"));
4040
}

0 commit comments

Comments
 (0)