Я m trying to build app with next.js ,apollo client at frontend and graphql-yoga and prisma at backend and i have problem with apollo client extension to chrome it cant fetch my date . That
с, как это выглядит. Не удалось получить изображение ошибки .И есть код:
import withApollo from "next-with-apollo";
import ApolloClient from "apollo-boost";
import { endpoint } from "../config";
function createClient({ headers }) {
return new ApolloClient({
uri: process.env.NODE_ENV === "development" ? endpoint : endpoint,
request: operation => {
operation.setContext({
fetchOptions: {
credentials: "include",
connectToDevTools: true
},
headers
});
}
});
}
export default withApollo(createClient);
Я знаю, что это, должно быть, мой глупый обман, но я не могу его найти.Спасибо всем, кто пытается мне помочь.