-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URI not considered #308
Comments
That's weird. |
You are right! I did test to hardcode "http://test.com" but i think it did not reload well so i thought i didn't work either in the first place. The issue only happens when using an env variable as follow: console.log("GRAPHQL URL", process.env.NEXT_PUBLIC_API_URL); // I can see it from here!
const httpLink = new HttpLink({
uri: process.env.NEXT_PUBLIC_API_URI,
fetchOptions: { cache: "no-store" },
}); However, i can console.log() it just |
Phew, that's extremely weird - that code hasn't been touched in years and together with the Apollo Client core library, probably millions of devs are running this. Really all I can think of would be next not correctly bundling the environment variable. Does is still log correctly of you put that |
I could have it work by manually rebuild my stack Thanks for your time! |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
Great to hear that everything worked out :) |
the same problem is reproduced in the local environment. |
I am trying to config the lib on a brand new project but when i perform a mutation, the request hits localhost (don't consider the uri i pass when configuring the client).
It looks like i am doing like the examples:
ApolloWrapper.tsx
layout.tsx
folder/page.tsx
The text was updated successfully, but these errors were encountered: