Skip to content

Commit 7ae977b

Browse files
committed
Lint fix
1 parent 70bdd12 commit 7ae977b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/presets/client/src/add-typename-selection-document-transform.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ export const addTypenameSelectionDocumentTransform: Types.DocumentTransformObjec
1212
document: document.document
1313
? visit(document.document, {
1414
SelectionSet(node, _, parent) {
15-
const isSubscriptionRoot = typeof((parent as ASTNode)?.kind) === 'string' &&
16-
(parent as ASTNode).kind === 'OperationDefinition' && (parent as OperationDefinitionNode).operation === 'subscription';
15+
const isSubscriptionRoot =
16+
typeof (parent as ASTNode)?.kind === 'string' &&
17+
(parent as ASTNode).kind === 'OperationDefinition' &&
18+
(parent as OperationDefinitionNode).operation === 'subscription';
1719
if (
18-
!isSubscriptionRoot && !node.selections.find(selection => selection.kind === 'Field' && selection.name.value === '__typename')
20+
!isSubscriptionRoot &&
21+
!node.selections.find(selection => selection.kind === 'Field' && selection.name.value === '__typename')
1922
) {
2023
return {
2124
...node,

0 commit comments

Comments
 (0)