Mirror: TypeScript LSP plugin that finds GraphQL documents in your code and provides diagnostics, auto-complete and hover-information.

fix(field-usage): add bail when we cant find anything (#226)

Changed files
+8
.changeset
packages
graphqlsp
+5
.changeset/light-parrots-train.md
···
···
+
---
+
'@0no-co/graphqlsp': patch
+
---
+
+
Add bail for field-usage when we can't find anything
+3
packages/graphqlsp/src/fieldUsage.ts
···
}
});
const unused = allPaths.filter(x => !allAccess.includes(x));
unused.forEach(unusedField => {
···
}
});
+
// Bail when we can't find anything
+
if (!allAccess.length) return;
+
const unused = allPaths.filter(x => !allAccess.includes(x));
unused.forEach(unusedField => {