Skip to content

Commit

Permalink
fix(cli): support scalars without extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Sep 9, 2022
1 parent d2e0803 commit 35366d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/breezy-dodos-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-mesh/cli': patch
---

Fix `Cannot read properties of undefined (reading 'codegenScalarType')`
2 changes: 1 addition & 1 deletion packages/cli/src/commands/ts-artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export async function generateTsArtifacts(
}
for (const typeName in unifiedSchema.getTypeMap()) {
const type = unifiedSchema.getType(typeName);
const codegenScalarType = type.extensions.codegenScalarType;
const codegenScalarType = type.extensions?.codegenScalarType;
if (codegenScalarType) {
codegenScalarsConfig[typeName] = codegenScalarType;
}
Expand Down

0 comments on commit 35366d0

Please sign in to comment.