0

Following the apollo react documentation works fine when I have an http url, but when I use an endpoint with SSL then I run into CORS errors.

import { ApolloClient} from 'apollo-boost';
import { HttpLink } from 'apollo-link-http';

const link = new HttpLink({
  uri: 'https://mywebsite.dev/graphql',
  useGETForQueries: true
});

const client = new ApolloClient({
  cache,
  link: 
});

I get that the httpLink is for http, but I don't see any documentation on how to implement an https link.

mmborado
  • 23
  • 5

1 Answers1

1

I doubt this is a http link issue - is the client in https and does the endpoint in https as well as accept that origin ?

Ramakay
  • 2,919
  • 1
  • 5
  • 21
  • Both the client and endpoint are in https. I will have to see if it accepts the origin. I know that I can preform queries and mutations fine with graphiQL, but I am not sure if that matters in this case. – mmborado Jul 10 '20 at 01:13