Skip to content

Commit

Permalink
Fix missing GraphQL type export
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonmade committed Aug 26, 2024
1 parent 97a7d4b commit 572db46
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tiny-mayflies-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@quilted/graphql-tools': patch
---

Fix missing GraphQL type export
14 changes: 14 additions & 0 deletions packages/graphql-tools/source/typescript/print/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,20 @@ function exportsForSelection(
),
);
}

namespaceBody.push(
t.exportNamedDeclaration(
t.tsTypeAliasDeclaration(
t.identifier(nestedTypeName),
null,
t.tsUnionType(
typescriptUnionMembers.map((name) =>
t.tsTypeReference(t.identifier(name)),
),
),
),
),
);
} else {
typescriptType = t.tsAnyKeyword();
}
Expand Down

0 comments on commit 572db46

Please sign in to comment.