Skip to content

Commit

Permalink
Fix setting shouldCheckForColocatedFragments to false falling bac…
Browse files Browse the repository at this point in the history
…k to `true` (#96)
  • Loading branch information
dan-lee authored Aug 17, 2023
1 parent 0bb162d commit bba1e6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/empty-planes-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@0no-co/graphqlsp': patch
---

Fix setting `shouldCheckForColocatedFragments` to `false` falling back to `true`
2 changes: 1 addition & 1 deletion packages/graphqlsp/src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function getGraphQLDiagnostics(
const tagTemplate = info.config.template || 'gql';
const scalars = info.config.scalars || {};
const shouldCheckForColocatedFragments =
info.config.shouldCheckForColocatedFragments || true;
info.config.shouldCheckForColocatedFragments ?? true;

let source = getSource(info, filename);
if (!source) return undefined;
Expand Down

0 comments on commit bba1e6f

Please sign in to comment.