Hi, is there a way to disable introspection querie...
# prisma-whats-new
p
Hi, is there a way to disable introspection queries in prisma?
n
If your service has a secret, the introspection only succeeds with a valid token.
p
I have a secret defined when instantiating Prisma but if I run a introspection query against my frontend for example with graphql voyager my schema returns
n
Is that against your Prisma API, or another GraphQL API?
p
Prisma API
I took the code from auth example and initialize the prisma instance like this:
const prisma: Prisma = new Prisma({ endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma DB service (value is set in .env) secret: process.env.PRISMA_SECRET, // taken from database/prisma.yml (value is set in .env debug: (process.env.DEBUG === ‘true’) // log all GraphQL queries & mutations });
process.env.PRISMA_SECRET
the environment variable is set
I digged through the code but it seams there is no configuration value on the graphQLServer as well so I wonder how to do it.
SOLVED: wrote a express middleware that will intercept the post request before it reaches the graphql server