Skip to content

Commit 88da520

Browse files
committed
refactor: change __dirname to process.cwd() in makeSchema constructor
1 parent 80a15e4 commit 88da520

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/schema.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import { makeSchema } from "nexus";
22
import { join } from "path";
33
import * as types from "./graphql";
44

5+
56
export const schema = makeSchema({
67
types,
78
outputs: {
8-
typegen: join(__dirname, "..", "nexus-typegen.ts"),
9-
schema: join(__dirname, "..", "schema.graphql"),
9+
typegen: join(process.cwd(), "nexus-typegen.ts"),
10+
schema: join(process.cwd(), "schema.graphql"),
1011
},
1112
contextType: {
12-
module: join(__dirname, "./context.ts"),
13+
module: join(process.cwd(), "./src/context.ts"),
1314
export: "Context",
1415
},
15-
});
16+
});

0 commit comments

Comments
 (0)