Created
March 12, 2018 21:22
-
-
Save lastmjs/854815966117ac0a83cbc73e2755c747 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const preparedFieldResolvers = addFragmentToFieldResolvers(parse(readFileSync('./schema/datamodel.graphql').toString()), `{ id }`) | |
const generatedFragmentReplacements = extractFragmentReplacements(preparedFieldResolvers); | |
const PrismaDBConnection = new Prisma({ | |
endpoint: 'http://127.0.0.1:4466/backend/dev', // the endpoint of the Prisma DB service | |
secret: 'mysecret123', // specified in database/prisma.yml //TODO obviously this should be controlled with environment variables | |
debug: true, // log all GraphQL queries & mutations | |
fragmentReplacements: generatedFragmentReplacements | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment