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

Configure Feed

Select the types of activity you want to include in your feed.

Extract fragment definitions from the root-document (#360)

authored by

Jovi De Croock and committed by
GitHub
92889494 0570a065

+9 -1
+5
.changeset/silent-spiders-tell.md
··· 1 + --- 2 + '@0no-co/graphqlsp': patch 3 + --- 4 + 5 + Extract inlined fragments for the non-tada route
+4 -1
packages/graphqlsp/src/persisted.ts
··· 198 198 const deduplicatedFragments = fragments 199 199 .map(fragment => { 200 200 stripUnmaskDirectivesFromDefinition(fragment); 201 - return print(fragment) 201 + return print(fragment); 202 202 }) 203 203 .filter((fragment, index, array) => array.indexOf(fragment) === index); 204 204 ··· 230 230 231 231 const spreads = new Set<string>(); 232 232 visit(parsed, { 233 + FragmentDefinition: node => { 234 + fragments.push(node); 235 + }, 233 236 FragmentSpread: node => { 234 237 spreads.add(node.name.value); 235 238 },