Skip to content

Commit 67c8216

Browse files
authored
Fix selection aliases in usage comment above MSW mock handlers
1 parent f6fc98a commit 67c8216

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/plugins/typescript/msw/src/visitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class MSWVisitor extends ClientSideBaseVisitor<MSWRawPluginConfig, MSWPlu
6767
}`;
6868

6969
/** @ts-expect-error name DOES exist on @type{import('graphql').SelectionNode} */
70-
const selections = node.selectionSet.selections.map(sel => sel.name.value).join(', ');
70+
const selections = node.selectionSet.selections.map(sel => (sel.alias || sel.name).value).join(', ');
7171
const variables = node.variableDefinitions.map(def => def.variable.name.value).join(', ');
7272

7373
return `/**

0 commit comments

Comments
 (0)