UNPKG

2.18 kBJavaScriptView Raw
1/* Core */
2export { ApolloClient, mergeOptions } from "./ApolloClient.js";
3export { ObservableQuery } from "./ObservableQuery.js";
4export { NetworkStatus, isNetworkRequestSettled } from "./networkStatus.js";
5export * from "./types.js";
6export { isApolloError, ApolloError } from "../errors/index.js";
7export { Cache, ApolloCache, InMemoryCache, MissingFieldError, defaultDataIdFromObject, makeVar, } from "../cache/index.js";
8export * from "../cache/inmemory/types.js";
9/* Link */
10export * from "../link/core/index.js";
11export * from "../link/http/index.js";
12export { fromError, toPromise, fromPromise, throwServerError, } from "../link/utils/index.js";
13export { DocumentTransform, Observable, isReference, makeReference, } from "../utilities/index.js";
14/* Supporting */
15// The verbosity of invariant.{log,warn,error} can be controlled globally
16// (for anyone using the same ts-invariant package) by passing "log",
17// "warn", "error", or "silent" to setVerbosity ("log" is the default).
18// Note that all invariant.* logging is hidden in production.
19import { setVerbosity } from "ts-invariant";
20export { setVerbosity as setLogVerbosity };
21setVerbosity(globalThis.__DEV__ !== false ? "log" : "silent");
22// Note that importing `gql` by itself, then destructuring
23// additional properties separately before exporting, is intentional.
24// Due to the way the `graphql-tag` library is setup, certain bundlers
25// can't find the properties added to the exported `gql` function without
26// additional guidance (e.g. Rollup - see
27// https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module).
28// Instead of having people that are using bundlers with `@apollo/client` add
29// extra bundler config to help `graphql-tag` exports be found (which would be
30// awkward since they aren't importing `graphql-tag` themselves), this
31// workaround of pulling the extra properties off the `gql` function,
32// then re-exporting them separately, helps keeps bundlers happy without any
33// additional config changes.
34export { gql, resetCaches, disableFragmentWarnings, enableExperimentalFragmentVariables, disableExperimentalFragmentVariables, } from "graphql-tag";
35//# sourceMappingURL=index.js.map
\No newline at end of file