First commit

This commit is contained in:
Kurt Hutten
2020-10-10 06:18:37 +11:00
commit 5f8cccf336
40 changed files with 15921 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import {
createGraphQLHandler,
makeMergedSchema,
makeServices,
} from '@redwoodjs/api'
import schemas from 'src/graphql/**/*.{js,ts}'
import services from 'src/services/**/*.{js,ts}'
import { db } from 'src/lib/db'
export const handler = createGraphQLHandler({
schema: makeMergedSchema({
schemas,
services: makeServices({ services }),
}),
onException: () => {
// Disconnect from your database with an unhandled exception.
db.$disconnect()
},
})

0
api/src/graphql/.keep Normal file
View File

6
api/src/lib/db.js Normal file
View File

@@ -0,0 +1,6 @@
// See https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/constructor
// for options.
import { PrismaClient } from '@prisma/client'
export const db = new PrismaClient()

0
api/src/services/.keep Normal file
View File