UNPKG

toystack

Version:

![Toystack CLI](https://framerusercontent.com/images/6KcXakCf8FI9LB2mJXNjcHIreDA.png)

19 lines (15 loc) 502 B
import { ApolloClient, InMemoryCache } from "@apollo/client"; import { createUploadLink } from "apollo-upload-client"; import fetch from "cross-fetch"; import dotenv from "dotenv"; dotenv.config(); const API_BASE_URL = process.env.API_BASE_URL || "https://core.toystack.ai"; const client = new ApolloClient({ //link: new HttpLink({ uri: process.env.TOYSTACK_BACKEND_URL, fetch }), link: createUploadLink({ uri: API_BASE_URL, fetch, }), cache: new InMemoryCache(), }); export default client;