UNPKG

1.73 kBJavaScriptView Raw
1"use strict";
2var __extends = (this && this.__extends) || (function () {
3 var extendStatics = Object.setPrototypeOf ||
4 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 return function (d, b) {
7 extendStatics(d, b);
8 function __() { this.constructor = d; }
9 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10 };
11})();
12function __export(m) {
13 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
14}
15Object.defineProperty(exports, "__esModule", { value: true });
16__export(require("apollo-client"));
17__export(require("apollo-link"));
18var apollo_link_http_1 = require("apollo-link-http");
19exports.HttpLink = apollo_link_http_1.HttpLink;
20__export(require("apollo-cache-inmemory"));
21var apollo_cache_inmemory_1 = require("apollo-cache-inmemory");
22exports.InMemoryCache = apollo_cache_inmemory_1.InMemoryCache;
23var graphql_tag_1 = require("graphql-tag");
24exports.gql = graphql_tag_1.default;
25var apollo_client_1 = require("apollo-client");
26var DefaultClient = (function (_super) {
27 __extends(DefaultClient, _super);
28 function DefaultClient(config) {
29 if (config === void 0) { config = {}; }
30 var _this = this;
31 if (!config.cache)
32 config.cache = new apollo_cache_inmemory_1.InMemoryCache();
33 if (!config.link)
34 config.link = new apollo_link_http_1.HttpLink({ uri: '/graphql' });
35 _this = _super.call(this, config) || this;
36 return _this;
37 }
38 return DefaultClient;
39}(apollo_client_1.default));
40exports.default = DefaultClient;
41//# sourceMappingURL=index.js.map
\No newline at end of file