import {
  ApolloClient,
  ApolloLink,
  // HttpLink,
  InMemoryCache,
} from "@apollo/client";

// const httpLink: HttpLink = new HttpLink({
//   uri: import.meta.env.VITE_GRAPHQL_URL,
// });

const middlewares = [];

const client: ApolloClient<any> = new ApolloClient({
  link: ApolloLink.from(middlewares),
  cache: new InMemoryCache(),
  defaultOptions: {
    watchQuery: {
      fetchPolicy: "network-only",
    },
    query: {
      fetchPolicy: "network-only",
    },
    mutate: {
      errorPolicy: "none",
    },
  },
});

export default client;
