A
A
Artem Nanavov2020-09-10 15:18:28
React
Artem Nanavov, 2020-09-10 15:18:28

How to set cookies in graphpql client react?

hello there is a code

const link = createHttpLink({
  uri: 'http://localhost:8000/graphql',
  credentials: 'same-origin',
  fetchOptions:{
    credentials:'same-origin'
  },
});

const client = new ApolloClient({
  // @ts-ignore
  link,
  cache: new InMemoryCache(),
  fetchOptions:{
    credentials:'same-origin'
  },
  credentials:'same-origin',
});


I'm trying to make it so that a cookie is sent along with the request, I did everything as in the documentation, but still for some reason it does not send a cookie

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question