Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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',