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.

fix(graphqlsp): Fix wrong fileType diagnostic error when introspection is disabled (#348)

Co-authored-by: Leonhard Rausch <leonhard.rausch@piazzablu.com>
Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>

authored by

FyndetNeo
Leonhard Rausch
Jovi De Croock
and committed by
GitHub
d0b4301c b426515d

+13 -6
+5
.changeset/metal-seals-swim.md
··· 1 + --- 2 + "@0no-co/graphqlsp": patch 3 + --- 4 + 5 + Fix wrong fileType diagnostic error when introspection is disabled
+8 -6
packages/graphqlsp/src/graphql/getSchema.ts
··· 126 126 } 127 127 128 128 if (ref.current) { 129 - saveTadaIntrospection( 130 - ref.current.introspection, 131 - tadaOutputLocation, 132 - tadaDisablePreprocessing, 133 - logger 134 - ); 129 + if (ref.current && ref.current.tadaOutputLocation !== undefined) { 130 + saveTadaIntrospection( 131 + ref.current.introspection, 132 + tadaOutputLocation, 133 + tadaDisablePreprocessing, 134 + logger 135 + ); 136 + } 135 137 } else if (ref.multi) { 136 138 Object.values(ref.multi).forEach(value => { 137 139 if (!value) return;