Ramin B
11/14/2018, 2:15 PMnikolasburk
nikolasburk
FormEntry
typeroberto.guerra
11/14/2018, 2:22 PMprisma-binding
library for this. We observed the same issue, that it wouldn’t return the nested objects. But using prisma-binding
instead of the prisma client did return the nested objects.Ramin B
11/14/2018, 2:49 PMprisma-binding
. it is passed into the Context when instantiating the server:
const db = new Prisma({
typeDefs: 'src/generated/prisma.graphql', // the auto-generated GraphQL schema of the Prisma API
endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma API (value set in `.env`)
secret: process.env.PRISMA_SECRET // only needed if specified in `database/prisma.yml` (value set in `.env`)
// debug: true // log all GraphQL queries & mutations sent to the Prisma API
})
const server = new GraphQLServer({
typeDefs: './src/schema.graphql',
resolvers,
context: req => ({ ...req, db })
})