mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-25 07:32:19 -05:00
28 lines
727 B
TypeScript
28 lines
727 B
TypeScript
import { makeSchema } from "@nexus/schema";
|
|
import * as userTypes from "graphql/schema/user";
|
|
import { nexusSchemaPrisma } from "nexus-plugin-prisma/schema";
|
|
import path from "path";
|
|
|
|
|
|
export const schema = makeSchema({
|
|
types: [userTypes],
|
|
plugins: [nexusSchemaPrisma()],
|
|
outputs: {
|
|
// FIXME: should be in graphql/generated instead root
|
|
schema: path.join(process.cwd(), "schema.graphql"),
|
|
typegen: path.join(process.cwd(), "nexus-typegen.ts"),
|
|
},
|
|
typegenAutoConfig: {
|
|
contextType: "Context.Context",
|
|
sources: [
|
|
{
|
|
source: "@prisma/client",
|
|
alias: "prisma",
|
|
},
|
|
{
|
|
source: require.resolve("graphql/context"),
|
|
alias: "Context",
|
|
},
|
|
],
|
|
},
|
|
}); |