diff --git a/.changeset/empty-planes-behave.md b/.changeset/empty-planes-behave.md new file mode 100644 index 00000000..a7b23e43 --- /dev/null +++ b/.changeset/empty-planes-behave.md @@ -0,0 +1,5 @@ +--- +'@0no-co/graphqlsp': patch +--- + +Fix setting `shouldCheckForColocatedFragments` to `false` falling back to `true` diff --git a/packages/graphqlsp/src/diagnostics.ts b/packages/graphqlsp/src/diagnostics.ts index dde3d9c0..1be2507c 100644 --- a/packages/graphqlsp/src/diagnostics.ts +++ b/packages/graphqlsp/src/diagnostics.ts @@ -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;