diff --git a/packages/graphqlsp/src/ast/checks.ts b/packages/graphqlsp/src/ast/checks.ts index 2f4735d..a22fce2 100644 --- a/packages/graphqlsp/src/ast/checks.ts +++ b/packages/graphqlsp/src/ast/checks.ts @@ -98,6 +98,8 @@ export const getSchemaName = ( ): string | null => { if (!typeChecker) return null; const type = typeChecker.getTypeAtLocation( + // When calling `graphql.persisted`, we need to access the `graphql` part of + // the expression; `node.expression` is the `.persisted` part isTadaPersistedCall ? node.getChildAt(0).getChildAt(0) : node.expression ); if (type) {