How to use the nexus-prisma.nexusPrismaPlugin 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 prisma / prisma-examples / typescript / graphql-auth / src / index.ts View on Github external
import { nexusPrismaPlugin } from 'nexus-prisma'
import { Photon } from '@generated/photon'
import { makeSchema } from 'nexus'
import { GraphQLServer } from 'graphql-yoga'
import { join } from 'path'
import { permissions } from './permissions'
import * as allTypes from './resolvers'

const photon = new Photon()

const nexusPrismaTypes = nexusPrismaPlugin({
  types: allTypes,
})
const schema = makeSchema({
  types: [allTypes, nexusPrismaTypes],
  outputs: {
    schema: join(__dirname, '/schema.graphql'),
  },
  typegenAutoConfig: {
    sources: [
      {
        source: '@generated/photon',
        alias: 'photon',
      },
      {
        source: join(__dirname, 'types.ts'),
        alias: 'ctx',

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