Skip to content

Instantly share code, notes, and snippets.

@JulienHe
Created September 5, 2022 01:25
Show Gist options
  • Save JulienHe/131e1693a60d67216117ded970de2479 to your computer and use it in GitHub Desktop.
Save JulienHe/131e1693a60d67216117ded970de2479 to your computer and use it in GitHub Desktop.
GraphQLClient
import { ApolloClient, InMemoryCache } from "@apollo/client";
import { SchemaLink } from "@apollo/client/link/schema";
import schema from "~/graphql/graphql-executable";
const GraphQLClient = new ApolloClient({
cache: new InMemoryCache(),
link: new SchemaLink({ schema }),
});
export default GraphQLClient;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment