Skip to content

Commit e7d8496

Browse files
author
Dimitri POSTOLOV
authored
fix: documents in graphql-config can be null (#518)
1 parent 8253e5a commit e7d8496

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/proud-bikes-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': patch
3+
---
4+
5+
fix: documents in graphql-config can be null

packages/plugin/src/sibling-operations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function getSiblingOperations(options: ParserOptions, gqlConfig: GraphQLC
7070
} else {
7171
const projectForFile = gqlConfig.getProjectForFile(options.filePath);
7272

73-
if (projectForFile && projectForFile.documents.length > 0) {
73+
if (projectForFile?.documents) {
7474
siblings = projectForFile.loadDocumentsSync(projectForFile.documents, {
7575
skipGraphQLImport: true,
7676
});

0 commit comments

Comments
 (0)