Why do I get this error? It is a server on graphql...
# orm-help
g
Why do I get this error? It is a server on graphql-yoga, I passed correct endpoint and secret, cannot understand what is wrong 😞
index.js
So, after a lot of tests (literally all day, lol): 1. It is not about my prisma service set up, I tried to do the same on demo server and the result was the same. 2. I tried to deploy prisma service without secret and it started working! But I want to have a protected endpoint, you know I checked a lot of times,
process.env.PRISMA_SECRET
is not empty. I think the bug is in
prisma-client-lib
(and in
prisma-binding
) because I tried to connect right to the endpoint using GraphQL Playground and I needed to provide auth token.
@divyendu @nilan any thoughts?
My repo (I switched to a new Prisma API so the screenshot above is old) - https://github.com/SilencerWeb/follow-api-server
h
make sure that PRISMA_SECRET is the same you are using in your prisma.yml file
double check it cause it works for me fine
g
@Harshit i'm sure it is the same.
d
@Gorodov Maksim: I did you did not have the secret before and then you added it but forgot running
prisma generate
again? https://github.com/SilencerWeb/follow-api-server/blob/master/src/generated/index.js Maybe we should improve this developer experience. Does this answer resolve it for you?
g
@divyendu no, it does not solve it. You checked the latest commit where I decided to work with prisma endpoint without secret. Here is the previous one with the correct generated assets - https://github.com/SilencerWeb/follow-api-server/blob/e2c5c7e63a83d4d59b748a8c924305053d59d180/src/generated/index.js. I checked 100 times, it showed correct endpoint and secret.
d
Can you please - super briefly - in the readme, mention steps that I can take to reproduce? I will take a look then 👍
g
@divyendu Sure! I will do it a little bit later, okay?
d
Sure, thanks!