Skip to content

Commit 6f0318f

Browse files
committed
Support PothosShemaBuilder in external modules
1 parent bd222b9 commit 6f0318f

File tree

1 file changed

+3
-1
lines changed
  • packages/@proto-graphql/codegen-core/src/types

1 file changed

+3
-1
lines changed

packages/@proto-graphql/codegen-core/src/types/TypeBase.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export abstract class TypeBase<P extends ProtoMessage | ProtoEnum | ProtoOneof>
3131
return [
3232
{
3333
alias: "builder",
34-
module: path.relative(path.dirname(this.filename), this.options.pothosBuilderPath),
34+
module: this.options.pothosBuilderPath.startsWith(".")
35+
? path.relative(path.dirname(this.filename), this.options.pothosBuilderPath)
36+
: this.options.pothosBuilderPath,
3537
type: "named",
3638
},
3739
];

0 commit comments

Comments
 (0)