СО
Size: a a a
СО
А
А
СО
СО
А
DP
DP
DP
R
const client = new ApolloClient({Данный вариант рабочий, но в главе Авторизация (в доке) юзают apollo-link-http
uri: "http://localhost:4000/graphql"
});
If your app is browser based and you are using cookies for login and session management with a backend, it's very easy to tell your network interface to send the cookie along with every request. You just need to pass the credentials option. e.g. credentials: 'same-origin' as shown below, if your backend server is the same domain or else credentials: 'include' if your backend is a different domain.
При использовании apollo-link-http, скорее всего, можно более тонко настроить http запросы.const link = new createHttpLink({При таком подходе запросы почему-то идут на 8080 порт (
uri: "http://localhost:4000/graphql",
credentials: "include",
});
const client = new ApolloClient({
link,
});
Request URL: http://localhost:8080/graphql
)e
const client = new ApolloClient({Данный вариант рабочий, но в главе Авторизация (в доке) юзают apollo-link-http
uri: "http://localhost:4000/graphql"
});
If your app is browser based and you are using cookies for login and session management with a backend, it's very easy to tell your network interface to send the cookie along with every request. You just need to pass the credentials option. e.g. credentials: 'same-origin' as shown below, if your backend server is the same domain or else credentials: 'include' if your backend is a different domain.
При использовании apollo-link-http, скорее всего, можно более тонко настроить http запросы.const link = new createHttpLink({При таком подходе запросы почему-то идут на 8080 порт (
uri: "http://localhost:4000/graphql",
credentials: "include",
});
const client = new ApolloClient({
link,
});
Request URL: http://localhost:8080/graphql
)R
R
e
R
R
e
R
AS
e