@rhtml/graphql 0.0.112 → 0.0.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,24 +15,24 @@ const graphql_client_1 = require("@rxdi/graphql-client");
15
15
  const rxjs_1 = require("rxjs");
16
16
  let BaseService = class BaseService {
17
17
  query(options) {
18
- return rxjs_1.from(this.graphql.query.bind(this.graphql)(options));
18
+ return (0, rxjs_1.from)(this.graphql.query.bind(this.graphql)(options));
19
19
  }
20
20
  mutate(options) {
21
- return rxjs_1.from(this.graphql.mutate.bind(this.graphql)(options));
21
+ return (0, rxjs_1.from)(this.graphql.mutate.bind(this.graphql)(options));
22
22
  }
23
23
  watchQuery(options) {
24
24
  return this.graphql.watchQuery(options);
25
25
  }
26
26
  subscribe(options) {
27
- return rxjs_1.from(this.graphql.subscribe.bind(this.graphql)(options));
27
+ return (0, rxjs_1.from)(this.graphql.subscribe.bind(this.graphql)(options));
28
28
  }
29
29
  };
30
30
  __decorate([
31
- core_1.Injector(graphql_client_1.ApolloClient),
31
+ (0, core_1.Injector)(graphql_client_1.ApolloClient),
32
32
  __metadata("design:type", Object)
33
33
  ], BaseService.prototype, "graphql", void 0);
34
34
  BaseService = __decorate([
35
- core_1.Injectable()
35
+ (0, core_1.Injectable)()
36
36
  ], BaseService);
37
37
  exports.BaseService = BaseService;
38
38
  //# sourceMappingURL=base.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.service.js","sourceRoot":"","sources":["../src/base.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAkD;AAClD,yDAK8B;AAE9B,+BAAwC;AAGxC,IAAa,WAAW,GAAxB,MAAa,WAAW;IAItB,KAAK,CAAI,OAAqB;QAC5B,OAAO,WAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAExD,CAAC;IACL,CAAC;IAED,MAAM,CAAI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AAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CACxB,CAAC;IAC/B,CAAC;CACF,CAAA;AAvBC;IADC,IAAA,eAAQ,EAAC,6BAAY,CAAC;;4CACM;AAFlB,WAAW;IADvB,IAAA,iBAAU,GAAE;GACA,WAAW,CAyBvB;AAzBY,kCAAW"}
@@ -28,14 +28,12 @@ let GraphComponent = class GraphComponent extends lit_html_1.LitElement {
28
28
  super(...arguments);
29
29
  this.options = {
30
30
  fetch: '',
31
- style: lit_html_1.css ``,
31
+ style: (0, lit_html_1.css) ``,
32
32
  state: new rxjs_1.BehaviorSubject({}),
33
- render: res => lit_html_1.html `
34
- ${res}
35
- `,
36
- loading: () => lit_html_1.html ``,
37
- error: () => lit_html_1.html ``,
38
- settings: {}
33
+ render: (res) => (0, lit_html_1.html) ` ${res} `,
34
+ loading: () => (0, lit_html_1.html) ``,
35
+ error: () => (0, lit_html_1.html) ``,
36
+ settings: {},
39
37
  };
40
38
  this.loading = true;
41
39
  this.error = '';
@@ -47,7 +45,7 @@ let GraphComponent = class GraphComponent extends lit_html_1.LitElement {
47
45
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
46
  let task;
49
47
  if (this.options.state) {
50
- if (rxjs_1.isObservable(this.options.state)) {
48
+ if ((0, rxjs_1.isObservable)(this.options.state)) {
51
49
  task = this.options.state;
52
50
  }
53
51
  else {
@@ -66,19 +64,19 @@ let GraphComponent = class GraphComponent extends lit_html_1.LitElement {
66
64
  if (this.options.subscribe) {
67
65
  this.pubsubSubscription = this.graphql
68
66
  .subscribe({
69
- query: graphql_tag_1.default `
67
+ query: (0, graphql_tag_1.default) `
70
68
  ${this.options.subscribe}
71
- `
69
+ `,
72
70
  })
73
- .subscribe(data => this.result.next(data), e => this.result.error(e));
71
+ .subscribe((data) => this.result.next(data), (e) => this.result.error(e));
74
72
  }
75
73
  if (!task) {
76
74
  return;
77
75
  }
78
- this.subscription = task.subscribe(detail => {
76
+ this.subscription = task.subscribe((detail) => {
79
77
  this.result.next(detail);
80
78
  this.dispatchEvent(new CustomEvent('onData', { detail }));
81
- }, error => {
79
+ }, (error) => {
82
80
  if (error && error.networkError) {
83
81
  if (error.networkError.result) {
84
82
  error.message = `${JSON.stringify(error.networkError.result.errors)} ${error.message}`;
@@ -105,7 +103,7 @@ let GraphComponent = class GraphComponent extends lit_html_1.LitElement {
105
103
  fetch = this.options.fetch['loc'].source.body;
106
104
  }
107
105
  if (typeof fetch === 'string' && fetch.includes('mutation')) {
108
- this.options.settings.mutation = graphql_tag_1.default `
106
+ this.options.settings.mutation = (0, graphql_tag_1.default) `
109
107
  ${fetch}
110
108
  `;
111
109
  return this.graphql.mutate(this.options.settings);
@@ -113,7 +111,7 @@ let GraphComponent = class GraphComponent extends lit_html_1.LitElement {
113
111
  this.options.settings.query =
114
112
  typeof fetch !== 'string'
115
113
  ? fetch
116
- : graphql_tag_1.default `
114
+ : (0, graphql_tag_1.default) `
117
115
  ${fetch}
118
116
  `;
119
117
  if (typeof fetch === 'string' && fetch.includes('subscription')) {
@@ -126,46 +124,46 @@ let GraphComponent = class GraphComponent extends lit_html_1.LitElement {
126
124
  }
127
125
  };
128
126
  __decorate([
129
- lit_html_1.property({ type: Object }),
127
+ (0, lit_html_1.property)({ type: Object }),
130
128
  __metadata("design:type", Object)
131
129
  ], GraphComponent.prototype, "options", void 0);
132
130
  __decorate([
133
- core_1.Inject(base_service_1.BaseService),
131
+ (0, core_1.Inject)(base_service_1.BaseService),
134
132
  __metadata("design:type", base_service_1.BaseService)
135
133
  ], GraphComponent.prototype, "graphql", void 0);
136
134
  __decorate([
137
- lit_html_1.property({ type: Boolean }),
135
+ (0, lit_html_1.property)({ type: Boolean }),
138
136
  __metadata("design:type", Object)
139
137
  ], GraphComponent.prototype, "loading", void 0);
140
138
  __decorate([
141
- lit_html_1.property({ type: String }),
139
+ (0, lit_html_1.property)({ type: String }),
142
140
  __metadata("design:type", Object)
143
141
  ], GraphComponent.prototype, "error", void 0);
144
142
  GraphComponent = __decorate([
145
- lit_html_1.Component({
143
+ (0, lit_html_1.Component)({
146
144
  selector: 'r-graph',
147
145
  template() {
148
146
  var _a;
149
- return lit_html_1.html `
147
+ return (0, lit_html_1.html) `
150
148
  <style>
151
149
  ${(_a = this.options) === null || _a === void 0 ? void 0 : _a.style}
152
150
  </style>
153
- ${lit_html_1.async(this.result.pipe(operators_1.map(state => this.options.render
154
- ? this.options.render(state, data => this.result.next(data), this.shadowRoot)
155
- : state), operators_1.tap(() => (this.loading = false)), operators_1.catchError(e => {
151
+ ${(0, lit_html_1.async)(this.result.pipe((0, operators_1.map)((state) => this.options.render
152
+ ? this.options.render(state, (data) => this.result.next(data), this.shadowRoot)
153
+ : state), (0, operators_1.tap)(() => (this.loading = false)), (0, operators_1.catchError)((e) => {
156
154
  this.error = e;
157
155
  this.loading = false;
158
- return rxjs_1.of('');
156
+ return (0, rxjs_1.of)('');
159
157
  })))}
160
158
  ${this.loading
161
- ? lit_html_1.html `
159
+ ? (0, lit_html_1.html) `
162
160
  ${typeof this.options.loading === 'function'
163
161
  ? this.options.loading()
164
162
  : core_1.Container.get(tokens_1.DEFAULTS).loading()}
165
163
  `
166
164
  : ''}
167
165
  ${this.error
168
- ? lit_html_1.html `
166
+ ? (0, lit_html_1.html) `
169
167
  ${typeof this.options.error === 'function'
170
168
  ? this.options.error(this.error)
171
169
  : core_1.Container.get(tokens_1.DEFAULTS).error(this.error)}
@@ -173,7 +171,7 @@ GraphComponent = __decorate([
173
171
  : ''}
174
172
  <slot></slot>
175
173
  `;
176
- }
174
+ },
177
175
  })
178
176
  ], GraphComponent);
179
177
  exports.GraphComponent = GraphComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"graph.component.js","sourceRoot":"","sources":["../src/graph.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAA+C;AAC/C,6CAOwB;AAOxB,8DAA8B;AAC9B,+BAOc;AACd,8CAAsD;AAEtD,iDAA6C;AAC7C,qCAAoC;AA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,KAAK,UAAU;oBACxC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;oBAChC,CAAC,CAAC,gBAAS,CAAC,GAAG,CAAC,iBAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;WAC9C;gBACH,CAAC,CAAC,EAAE;;KAEP,CAAC;QACJ,CAAC;KACF,CAAC;GACW,cAAc,CAwH1B;AAxHY,wCAAc"}
@@ -18,12 +18,12 @@ let GraphModule = GraphModule_1 = class GraphModule {
18
18
  module: GraphModule_1,
19
19
  components: [graph_component_1.GraphComponent],
20
20
  providers: [{ provide: tokens_1.DEFAULTS, useValue: defaults }],
21
- frameworkImports: [graphql_client_1.GraphqlModule.forRoot(config)]
21
+ frameworkImports: [graphql_client_1.GraphqlModule.forRoot(config)],
22
22
  };
23
23
  }
24
24
  };
25
25
  GraphModule = GraphModule_1 = __decorate([
26
- core_1.Module()
26
+ (0, core_1.Module)()
27
27
  ], GraphModule);
28
28
  exports.GraphModule = GraphModule;
29
29
  //# sourceMappingURL=graph.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph.module.js","sourceRoot":"","sources":["../src/graph.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qCAAyD;AACzD,yDAA0E;AAE1E,uDAAmD;AACnD,qCAAoC;AAGpC,IAAa,WAAW,mBAAxB,MAAa,WAAW;IACf,MAAM,CAAC,OAAO,CACnB,MAA2B,EAC3B,WAAqB,EAAc;QAEnC,OAAO;YACL,MAAM,EAAE,aAAW;YACnB,UAAU,EAAE,CAAC,gCAAc,CAAC;YAC5B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;YACtD,gBAAgB,EAAE,CAAC,8BAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;SAClD,CAAC;IACJ,CAAC;CACF,CAAA;AAZY,WAAW;IADvB,aAAM,EAAE;GACI,WAAW,CAYvB;AAZY,kCAAW"}
1
+ {"version":3,"file":"graph.module.js","sourceRoot":"","sources":["../src/graph.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qCAAyD;AACzD,yDAA0E;AAE1E,uDAAmD;AACnD,qCAAoC;AAGpC,IAAa,WAAW,mBAAxB,MAAa,WAAW;IACf,MAAM,CAAC,OAAO,CACnB,MAA2B,EAC3B,WAAqB,EAAc;QAEnC,OAAO;YACL,MAAM,EAAE,aAAW;YACnB,UAAU,EAAE,CAAC,gCAAc,CAAC;YAC5B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;YACtD,gBAAgB,EAAE,CAAC,8BAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;SAClD,CAAC;IACJ,CAAC;CACF,CAAA;AAZY,WAAW;IADvB,IAAA,aAAM,GAAE;GACI,WAAW,CAYvB;AAZY,kCAAW"}
package/dist/index.js CHANGED
@@ -1,23 +1,27 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
8
12
  }));
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  exports.setConfig = void 0;
14
18
  const core_1 = require("@rxdi/core");
15
19
  const graph_module_1 = require("./graph.module");
16
20
  function setConfig(graphqlSettings) {
17
- return core_1.Module({
21
+ return (0, core_1.Module)({
18
22
  imports: [
19
- graph_module_1.GraphModule.forRoot(graphqlSettings.config, graphqlSettings.defaults)
20
- ]
23
+ graph_module_1.GraphModule.forRoot(graphqlSettings.config, graphqlSettings.defaults),
24
+ ],
21
25
  })(class GraphqlModule {
22
26
  });
23
27
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAoC;AAGpC,iDAA6C;AAG7C,SAAgB,SAAS,CAAC,eAAgC;IACxD,OAAO,aAAM,CAAC;QACZ,OAAO,EAAE;YACP,0BAAW,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC;SACtE;KACF,CAAC,CAAC,MAAM,aAAa;KAAG,CAAC,CAAC;AAC7B,CAAC;AAND,8BAMC;AAED,iDAA+B;AAC/B,oDAAkC;AAClC,0CAAwB;AACxB,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCAAoC;AAGpC,iDAA6C;AAG7C,SAAgB,SAAS,CAAC,eAAgC;IACxD,OAAO,IAAA,aAAM,EAAC;QACZ,OAAO,EAAE;YACP,0BAAW,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC;SACtE;KACF,CAAC,CAAC,MAAM,aAAa;KAAG,CAAC,CAAC;AAC7B,CAAC;AAND,8BAMC;AAED,iDAA+B;AAC/B,oDAAkC;AAClC,0CAAwB;AACxB,6CAA2B"}
package/dist/settings.js CHANGED
@@ -19,23 +19,19 @@ exports.GraphqlSettings = {
19
19
  return __awaiter(this, void 0, void 0, function* () {
20
20
  return new Headers();
21
21
  });
22
- }
22
+ },
23
23
  },
24
24
  defaults: {
25
- error: e => {
26
- return lit_html_1.html `
27
- <p style="color: black">
28
- ${e}
29
- </p>
30
- `;
25
+ error: (e) => {
26
+ return (0, lit_html_1.html) ` <p style="color: black">${e}</p> `;
31
27
  },
32
28
  loading: () => {
33
- return lit_html_1.html `
29
+ return (0, lit_html_1.html) `
34
30
  <div style="text-align: center;">
35
31
  <rx-loading palette="danger"></rx-loading>
36
32
  </div>
37
33
  `;
38
- }
39
- }
34
+ },
35
+ },
40
36
  };
41
37
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,6CAAsC;AASzB,QAAA,eAAe,GAAoB;IAC9C,MAAM,EAAE;QACN,GAAG,EAAE,qCAAqC;QAC1C,MAAM,EAAE,yCAAyC;QAC3C,SAAS;;gBACb,OAAO,IAAI,OAAO,EAAE,CAAC;YACvB,CAAC;SAAA;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,CAAC,CAAC,EAAE;YACT,OAAO,eAAI,CAAA;;YAEL,CAAC;;OAEN,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,OAAO,eAAI,CAAA;;;;OAIV,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,6CAAsC;AASzB,QAAA,eAAe,GAAoB;IAC9C,MAAM,EAAE;QACN,GAAG,EAAE,qCAAqC;QAC1C,MAAM,EAAE,yCAAyC;QAC3C,SAAS;;gBACb,OAAO,IAAI,OAAO,EAAE,CAAC;YACvB,CAAC;SAAA;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE;YACX,OAAO,IAAA,eAAI,EAAA,4BAA4B,CAAC,OAAO,CAAC;QAClD,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,OAAO,IAAA,eAAI,EAAA;;;;OAIV,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhtml/graphql",
3
- "version": "0.0.112",
3
+ "version": "0.0.115",
4
4
  "description": "Reactive HyperText Markup Language",
5
5
  "scripts": {
6
6
  "start": "npx parcel ./examples/index.html --out-dir build/examples",
@@ -11,16 +11,7 @@
11
11
  "lint-fix": "npx eslint . --fix --ext .ts",
12
12
  "build": "rm -rf dist && tsc"
13
13
  },
14
- "devDependencies": {
15
- "eslint": "^6.7.2",
16
- "eslint-config-prettier": "^6.7.0",
17
- "eslint-plugin-prettier": "^3.1.1",
18
- "eslint-plugin-simple-import-sort": "^5.0.0",
19
- "@typescript-eslint/eslint-plugin": "^2.10.0",
20
- "@typescript-eslint/parser": "^2.10.0",
21
- "prettier": "^1.19.1",
22
- "ts-jest": "25.2.1"
23
- },
14
+ "devDependencies": {},
24
15
  "repository": {
25
16
  "type": "git",
26
17
  "url": "git@github.com:rhtml/rhtml.git"
@@ -3,7 +3,7 @@ import {
3
3
  ApolloClient,
4
4
  MutationOptions,
5
5
  QueryOptions,
6
- SubscriptionOptions
6
+ SubscriptionOptions,
7
7
  } from '@rxdi/graphql-client';
8
8
  import { WatchQueryOptions } from 'apollo-client';
9
9
  import { from, Observable } from 'rxjs';
@@ -5,13 +5,13 @@ import {
5
5
  css,
6
6
  html,
7
7
  LitElement,
8
- property
8
+ property,
9
9
  } from '@rxdi/lit-html';
10
10
  import {
11
11
  MutationOptions,
12
12
  QueryBaseOptions,
13
13
  QueryOptions,
14
- SubscriptionOptions
14
+ SubscriptionOptions,
15
15
  } from 'apollo-client';
16
16
  import gql from 'graphql-tag';
17
17
  import {
@@ -20,7 +20,7 @@ import {
20
20
  Observable,
21
21
  of,
22
22
  ReplaySubject,
23
- Subscription
23
+ Subscription,
24
24
  } from 'rxjs';
25
25
  import { catchError, map, tap } from 'rxjs/operators';
26
26
 
@@ -40,17 +40,17 @@ import { GraphOptions } from './types';
40
40
  </style>
41
41
  ${async(
42
42
  this.result.pipe(
43
- map(state =>
43
+ map((state) =>
44
44
  this.options.render
45
45
  ? this.options.render(
46
46
  state,
47
- data => this.result.next(data),
47
+ (data) => this.result.next(data),
48
48
  this.shadowRoot
49
49
  )
50
50
  : state
51
51
  ),
52
52
  tap(() => (this.loading = false)),
53
- catchError(e => {
53
+ catchError((e) => {
54
54
  this.error = e;
55
55
  this.loading = false;
56
56
  return of('');
@@ -73,7 +73,7 @@ import { GraphOptions } from './types';
73
73
  : ''}
74
74
  <slot></slot>
75
75
  `;
76
- }
76
+ },
77
77
  })
78
78
  export class GraphComponent extends LitElement {
79
79
  @property({ type: Object })
@@ -81,13 +81,10 @@ export class GraphComponent extends LitElement {
81
81
  fetch: '',
82
82
  style: css``,
83
83
  state: new BehaviorSubject({}),
84
- render: res =>
85
- html`
86
- ${res}
87
- `,
84
+ render: (res) => html` ${res} `,
88
85
  loading: () => html``,
89
86
  error: () => html``,
90
- settings: {} as QueryBaseOptions
87
+ settings: {} as QueryBaseOptions,
91
88
  };
92
89
 
93
90
  @Inject(BaseService)
@@ -128,22 +125,22 @@ export class GraphComponent extends LitElement {
128
125
  .subscribe({
129
126
  query: gql`
130
127
  ${this.options.subscribe}
131
- `
128
+ `,
132
129
  })
133
130
  .subscribe(
134
- data => this.result.next(data),
135
- e => this.result.error(e)
131
+ (data) => this.result.next(data),
132
+ (e) => this.result.error(e)
136
133
  );
137
134
  }
138
135
  if (!task) {
139
136
  return;
140
137
  }
141
138
  this.subscription = task.subscribe(
142
- detail => {
139
+ (detail) => {
143
140
  this.result.next(detail);
144
141
  this.dispatchEvent(new CustomEvent('onData', { detail }));
145
142
  },
146
- error => {
143
+ (error) => {
147
144
  if (error && error.networkError) {
148
145
  if (error.networkError.result) {
149
146
  error.message = `${JSON.stringify(
@@ -14,7 +14,7 @@ export class GraphModule {
14
14
  module: GraphModule,
15
15
  components: [GraphComponent],
16
16
  providers: [{ provide: DEFAULTS, useValue: defaults }],
17
- frameworkImports: [GraphqlModule.forRoot(config)]
17
+ frameworkImports: [GraphqlModule.forRoot(config)],
18
18
  };
19
19
  }
20
20
  }
package/src/index.ts CHANGED
@@ -7,8 +7,8 @@ import { GraphqlSettings } from './settings';
7
7
  export function setConfig(graphqlSettings: GraphqlSettings) {
8
8
  return Module({
9
9
  imports: [
10
- GraphModule.forRoot(graphqlSettings.config, graphqlSettings.defaults)
11
- ]
10
+ GraphModule.forRoot(graphqlSettings.config, graphqlSettings.defaults),
11
+ ],
12
12
  })(class GraphqlModule {});
13
13
  }
14
14
 
package/src/settings.ts CHANGED
@@ -14,15 +14,11 @@ export const GraphqlSettings: GraphqlSettings = {
14
14
  pubsub: 'wss://pubsub.youvolio.com/subscriptions',
15
15
  async onRequest() {
16
16
  return new Headers();
17
- }
17
+ },
18
18
  },
19
19
  defaults: {
20
- error: e => {
21
- return html`
22
- <p style="color: black">
23
- ${e}
24
- </p>
25
- `;
20
+ error: (e) => {
21
+ return html` <p style="color: black">${e}</p> `;
26
22
  },
27
23
  loading: () => {
28
24
  return html`
@@ -30,6 +26,6 @@ export const GraphqlSettings: GraphqlSettings = {
30
26
  <rx-loading palette="danger"></rx-loading>
31
27
  </div>
32
28
  `;
33
- }
34
- }
29
+ },
30
+ },
35
31
  };
package/.eslintrc.js DELETED
@@ -1,26 +0,0 @@
1
- module.exports = {
2
- // Specifies the ESLint parser
3
- parser: "@typescript-eslint/parser",
4
- extends: [
5
- // Uses the recommended rules from the @typescript-eslint/eslint-plugin
6
- "plugin:@typescript-eslint/recommended",
7
- // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
8
- "prettier/@typescript-eslint",
9
- // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
10
- "plugin:prettier/recommended"
11
- ],
12
- parserOptions: {
13
- // Allows for the parsing of modern ECMAScript features
14
- ecmaVersion: 2018,
15
- // Allows for the use of imports
16
- sourceType: "module"
17
- },
18
- rules: {
19
- "@typescript-eslint/explicit-function-return-type": 0,
20
- "simple-import-sort/sort": "error",
21
- "sort-imports": "off",
22
- "import/order": "off",
23
- "@typescript-eslint/camelcase": 0
24
- },
25
- plugins: ["simple-import-sort"]
26
- };
package/.prettierrc DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "printWidth": 80
4
- }
package/jest.config.js DELETED
@@ -1,16 +0,0 @@
1
- module.exports = {
2
- testEnvironment: 'node',
3
- testPathIgnorePatterns: ['/node_modules/'],
4
- coverageReporters: ['lcov', 'html'],
5
- rootDir: './',
6
- moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'node'],
7
- globals: {
8
- __DEV__: true
9
- },
10
- transform: {
11
- '\\.(ts|tsx)$': 'ts-jest'
12
- },
13
- testRegex: '/src/.*\\.spec.(ts|tsx|js)$',
14
- verbose: true,
15
- collectCoverage: true
16
- };
package/tslint.json DELETED
@@ -1,113 +0,0 @@
1
- {
2
- "rules": {
3
- "arrow-return-shorthand": true,
4
- "callable-types": true,
5
- "class-name": true,
6
- "comment-format": [
7
- true,
8
- "check-space"
9
- ],
10
- "curly": true,
11
- "eofline": true,
12
- "forin": true,
13
- "import-blacklist": [
14
- true,
15
- "rxjs/Rx"
16
- ],
17
- "import-spacing": true,
18
- "indent": [
19
- true,
20
- "spaces"
21
- ],
22
- "interface-over-type-literal": true,
23
- "label-position": true,
24
- "max-line-length": [
25
- true,
26
- 140
27
- ],
28
- "member-access": false,
29
- "member-ordering": [
30
- true,
31
- {
32
- "order": [
33
- "static-field",
34
- "instance-field",
35
- "static-method",
36
- "instance-method"
37
- ]
38
- }
39
- ],
40
- "no-arg": true,
41
- "no-bitwise": true,
42
- "no-console": [
43
- true,
44
- "debug",
45
- "info",
46
- "time",
47
- "timeEnd",
48
- "trace"
49
- ],
50
- "no-construct": true,
51
- "no-debugger": true,
52
- "no-duplicate-super": true,
53
- "no-empty": false,
54
- "no-empty-interface": true,
55
- "no-eval": true,
56
- "no-inferrable-types": [
57
- true,
58
- "ignore-params"
59
- ],
60
- "no-misused-new": true,
61
- "no-non-null-assertion": true,
62
- "no-shadowed-variable": true,
63
- "no-string-literal": false,
64
- "no-string-throw": true,
65
- "no-switch-case-fall-through": true,
66
- "no-trailing-whitespace": true,
67
- "no-unnecessary-initializer": true,
68
- "no-unused-expression": true,
69
- "no-var-keyword": true,
70
- "object-literal-sort-keys": false,
71
- "one-line": [
72
- true,
73
- "check-open-brace",
74
- "check-catch",
75
- "check-else",
76
- "check-whitespace"
77
- ],
78
- "prefer-const": true,
79
- "quotemark": [
80
- true,
81
- "single"
82
- ],
83
- "radix": true,
84
- "semicolon": [
85
- false,
86
- "never"
87
- ],
88
- "triple-equals": [
89
- true,
90
- "allow-null-check"
91
- ],
92
- "typedef-whitespace": [
93
- true,
94
- {
95
- "call-signature": "nospace",
96
- "index-signature": "nospace",
97
- "parameter": "nospace",
98
- "property-declaration": "nospace",
99
- "variable-declaration": "nospace"
100
- }
101
- ],
102
- "unified-signatures": true,
103
- "variable-name": false,
104
- "whitespace": [
105
- true,
106
- "check-branch",
107
- "check-decl",
108
- "check-operator",
109
- "check-separator",
110
- "check-type"
111
- ]
112
- }
113
- }