i'm using the graphql-request npm package in order to use graphql in my software. i have the following line in my code:
const client: GraphQLClient = new GraphQLClient(process.env.OCEAN_ENDPOINT, {});
client.setHeaders({ Authorization: `Bearer: ${token}` });
and then i want to fire a request i use:
await client.request(query, variables);
until two days ago my endpoint was an http url, but now it changed to https and from that moment i'm getting this error:
FetchError: request to https://{graphqlEndpoint}/v1/graphql failed, reason: unable to verify the first certificate
has anyone faced this issue before?
NODE_TLS_REJECT_UNAUTHORIZED = "0";
adding this in env worked for me in nextjs project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With