diff --git a/packages/common/src/codegen/utils/extractUserTypes.ts b/packages/common/src/codegen/utils/extractUserTypes.ts index 9d738bb79e..31443ea0fd 100644 --- a/packages/common/src/codegen/utils/extractUserTypes.ts +++ b/packages/common/src/codegen/utils/extractUserTypes.ts @@ -21,7 +21,7 @@ export function extractUserTypes( ): Record { const ast = parse(data); - const isRelativePath = fromPath.indexOf(".") === 0; + const isRelativePath = fromPath.at(0) === "."; const userDefinedTypes: Record = {}; visit(ast, {