I have setup ApolloClient
with reactjs. I have created server on url http://localhost:3044/graphql
. Now I need to test whether it connected to that backend url or not. How do I do that?
import ApolloClient from 'apollo-boost';
import { HttpLink } from 'apollo-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';
const BASE_URL = 'http://localhost:3055/graphql';
const cache = new InMemoryCache();
const httpLink = new HttpLink({
uri: BASE_URL
});
export const client = new ApolloClient({
uri:BASE_URL
});
ReactDOM.render(
<ApolloProvider client={client}>
<App />
</ApolloProvider>
, document.getElementById('root'));
Thank you!!!