Ошибка Apollo Client local resolver handling has been disabled and 400 Bad Request
Я использую GraphQl для доступа и установки JWT токена в заголовок авторизации, но он выдает 2 ошибки, я сделал все, но не могу решить и исправить это.
const client = new ApolloClient({
uri: "http://localhost:8000/graphql/",
fetchOptions : {
credentials: "include"
},
request: operation => {
const token = localStorage.getItem('authToken') || "";
operation.setContext({
headers: {
Authorization: `JWT ${token}`
}
});
},
clientState : {
defaults: {
isLoggedIn: !!localStorage.getItem('authToken')
}
}
});
Инструменты разработчика предупреждают, что:
- Found @client directives in a query but no ApolloClient resolvers were specified. This means ApolloClient local resolver handling has been disabled, and @client directives will be passed through to your link chain.
- POST http://localhost:8000/graphql/ 400 (Bad Request)