We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28b3400 commit 9a40f72Copy full SHA for 9a40f72
src/visitor.ts
@@ -42,8 +42,12 @@ export class Visitor extends TsVisitor {
42
public getScalarType(scalarName: string): string | null {
43
if (this.scalarDirection === 'both')
44
return null;
45
-
46
- return this.scalars[scalarName][this.scalarDirection];
+ }
+ const scalar = this.scalars[scalarName];
47
+ if (!scalar) {
48
+ throw new Error(`Unknown scalar ${scalarName}`);
49
50
+ return scalar[this.scalarDirection];
51
}
52
53
public shouldEmitAsNotAllowEmptyString(name: string): boolean {
0 commit comments