Can anyone help me?
# orm-help
h
Can anyone help me?
h
context?
h
Copy code
context: req => ({
    ...req,
    db: new Prisma({
      typeDefs: 'src/generated/prisma.graphql', // the auto-generated GraphQL schema of the Prisma API
      endpoint: '<https://eu1.prisma.sh/haider-malik-c1556d/service-hn/dev>', // the endpoint of the Prisma API
      debug: true, // log all GraphQL queries & mutations sent to the Prisma API
      secret: 'mysecret123', // only needed if specified in `database/prisma.yml`
    }),
  }),
I am using this boilerplate project. I did not add anything new
h
I meant what did you do to get the error and where did you get it from
h
I did not get any error message in my console. I resolved this issue
n
how?
a
I have gotten this issue before in some of my projects when I first started using GraphQL, is this endpoint sitting behind a protected route?
n
What is a protected route?
a
well in my specific use case I had it behind a route only authenticated users could reach — I just had to add an “authentication” header with the respective token and that’s it
💡 1
I moved away from this approach shortly after as it was a bit of a pain and started using custom auth directives via apollo-server
l
Almost any time you see this error, it's a non 200 server error, e.g.
401 unauthorized
. Take a look in your network tab to see the problem.