How to use the nexus-prisma.buildPrismaSchema function in nexus-prisma

To help you get started, we’ve selected a few nexus-prisma examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fluidstackdev / fluidstack / packages / server / src / schema.ts View on Github external
import * as path from 'path'
import * as allTypes from './resolvers'
import { buildPrismaSchema } from 'nexus-prisma'

/**
 * Finally, we construct our schema (whose starting query type is the query
 * type we defined above) and export it.
 */

export const schema = buildPrismaSchema({
  types: allTypes,

  prisma: {
    schemaPath: path.join(__dirname, './generated/prisma.graphql'),
    contextClientName: 'prisma',
  },

  outputs: {
    schema: path.join(__dirname, './generated/nexus.graphql'),
    typegen: path.join(__dirname, './generated/nexus.ts'),
  },

  typegenAutoConfig: {
    sources: [
      {
        module: path.join(__dirname, './generated/prisma-client/index.ts'),

nexus-prisma

<p align="center"> <img src="https://i.imgur.com/8qvElTM.png" width="300" align="center" /> <h1 align="center"><a style="color:black;" href="https://graphql-nexus.github.io/nexus-prisma">nexus-prisma</a></h1> </p>

MIT
Latest version published 7 months ago

Package Health Score

70 / 100
Full package analysis