我已经阅读了一些与我的相关的其他问题,但无法得到答案。
import { ApolloClient, createHttpLink, InMemoryCache, ApolloProvider } from '@apollo/client';
const link = createHttpLink({
uri: 'https://example.com/graphql',
credentials: 'include'
});
const client = new ApolloClient({
link,
cache: new InMemoryCache(),
});
ReactDOM.render(
<React.StrictMode>
<ApolloProvider client={client} >
<App />
</ApolloProvider>
</React.StrictMode>,
document.getElementById('root')
);
这是我在所有 React 应用程序中使用的代码,在这个应用程序中,我试图在我的本地主机中使用我的 graphql 后端,所以我认为问题出在那里。我在问题中收到此警告:
那么有没有人知道这个问题或者我该如何解决?