You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just started a project which uses nuxt-graphql-client and nuxt-graphql-server in the same project. I want my project to have an externally available graphql api, and have my client use it as well.
This works great when deployed to production or locally when I have 2 instances of my project running (one dedicated to be the server with the client module disabled).
When trying to run both on the same project I get an error from the client saying it's finding an invalid graphql schema when it tries to connect to localhost:3000/api/graphql.
I think this is because the client is trying to connect before the server is running. Is there a way to delay the client connection by a few seconds or any ideas on what else to try?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First, thanks to Diizzayy for this great module!
I've just started a project which uses nuxt-graphql-client and nuxt-graphql-server in the same project. I want my project to have an externally available graphql api, and have my client use it as well.
This works great when deployed to production or locally when I have 2 instances of my project running (one dedicated to be the server with the client module disabled).
When trying to run both on the same project I get an error from the client saying it's finding an invalid graphql schema when it tries to connect to localhost:3000/api/graphql.
Error:
Failed to load schema from http://localhost:3000/api/graphql:
Unexpected response: "<title>Starting nuxt...
I think this is because the client is trying to connect before the server is running. Is there a way to delay the client connection by a few seconds or any ideas on what else to try?
Beta Was this translation helpful? Give feedback.
All reactions