Skip to content

Instantly share code, notes, and snippets.

@stemmlerjs
Created February 13, 2020 16:53
Show Gist options
  • Select an option

  • Save stemmlerjs/303ad4d252a73ac35f01b46f7728fabb to your computer and use it in GitHub Desktop.

Select an option

Save stemmlerjs/303ad4d252a73ac35f01b46f7728fabb to your computer and use it in GitHub Desktop.
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import "./index.css"
import {
ApolloClient,
InMemoryCache,
ApolloProvider,
HttpLink
} from "@apollo/client";
import { createUploadLink } from 'apollo-upload-client'
const client = new ApolloClient({
cache: new InMemoryCache(),
//@ts-ignore
link: createUploadLink({
uri: "http://localhost:4000",
}),
});
ReactDOM.render(
<ApolloProvider client={client}>
<App />
</ApolloProvider>,
document.getElementById("root")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment