I've deployed the Graphql API on railway and webapp on vercel. After making the API calls from the webapp, it throws this error.
ApolloError: request to https://<domain>/graphql failed, reason: Hostname/IP does not match certificate's altnames: Host: 7pdafy4gh-mittalyashu1.vercel.app. is not in the cert's altnames: DNS:*.up.railway.app
ApolloError: request to https://<domain>/graphql failed, reason: Hostname/IP does not match certificate's altnames: Host: 7pdafy4gh-mittalyashu1.vercel.app. is not in the cert's altnames: DNS:*.up.railway.app
Looks like a CORS error
You’re gonna have to put them on the same domain. You could setup a custom domain for this.
e.g run mysite.com on Vercel and api.mysite.com on Railway
I have tried that, and still getting the same error,
ApolloError: request to https://backend.verbals.io/graphql failed, reason: Hostname/IP does not match certificate's altnames: Host: verbals.io. is not in the cert's altnames: DNS:*.up.railway.app
ApolloError: request to https://backend.verbals.io/graphql failed, reason: Hostname/IP does not match certificate's altnames: Host: verbals.io. is not in the cert's altnames: DNS:*.up.railway.app