@rhtml/components 0.0.116 → 0.0.118

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.
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
+ import { ErrorPolicy, FetchPolicy } from '@apollo/client/core/watchQueryOptions';
1
2
  import { TemplateResult } from '@rxdi/lit-html';
2
- import { ErrorPolicy, FetchPolicy } from 'apollo-client';
3
3
  import { DocumentNode } from 'graphql';
4
4
  export interface Settings {
5
5
  query?: DocumentNode;
package/libs/README.md ADDED
@@ -0,0 +1,3 @@
1
+ This file is with purpose to replace original file inside `node_modules/@apollo/client/link/core/types.d.ts`
2
+ Fixes bug with not transpiling package due to newer version of graphql >15 which has 2 generic arguments but instead older one has one generic argument
3
+ TODO delete this after migration to newer graphql version
package/libs/types ADDED
@@ -0,0 +1,51 @@
1
+ import { DocumentNode, ExecutionResult, GraphQLError } from "graphql";
2
+ export { DocumentNode };
3
+ import { Observable } from "../../utilities";
4
+ export declare type Path = ReadonlyArray<string | number>;
5
+ declare type Data<T> = T | null | undefined;
6
+ interface ExecutionPatchResultBase {
7
+ hasNext?: boolean;
8
+ }
9
+ export interface ExecutionPatchInitialResult<TData = Record<string, any>, TExtensions = Record<string, any>> extends ExecutionPatchResultBase {
10
+ data: Data<TData>;
11
+ incremental?: never;
12
+ errors?: ReadonlyArray<GraphQLError>;
13
+ extensions?: TExtensions;
14
+ }
15
+ export interface IncrementalPayload<TData, TExtensions> {
16
+ data: Data<TData>;
17
+ label?: string;
18
+ path: Path;
19
+ errors?: ReadonlyArray<GraphQLError>;
20
+ extensions?: TExtensions;
21
+ }
22
+ export interface ExecutionPatchIncrementalResult<TData = Record<string, any>, TExtensions = Record<string, any>> extends ExecutionPatchResultBase {
23
+ incremental?: IncrementalPayload<TData, TExtensions>[];
24
+ data?: never;
25
+ errors?: never;
26
+ extensions?: never;
27
+ }
28
+ export declare type ExecutionPatchResult<TData = Record<string, any>, TExtensions = Record<string, any>> = ExecutionPatchInitialResult<TData, TExtensions> | ExecutionPatchIncrementalResult<TData, TExtensions>;
29
+ export interface GraphQLRequest {
30
+ query: DocumentNode;
31
+ variables?: Record<string, any>;
32
+ operationName?: string;
33
+ context?: Record<string, any>;
34
+ extensions?: Record<string, any>;
35
+ }
36
+ export interface Operation {
37
+ query: DocumentNode;
38
+ variables: Record<string, any>;
39
+ operationName: string;
40
+ extensions: Record<string, any>;
41
+ setContext: (context: Record<string, any>) => Record<string, any>;
42
+ getContext: () => Record<string, any>;
43
+ }
44
+ export interface SingleExecutionResult<TData = Record<string, any>, TContext = Record<string, any>, TExtensions = Record<string, any>> extends ExecutionResult<TData> {
45
+ data?: Data<TData>;
46
+ context?: TContext;
47
+ }
48
+ export declare type FetchResult<TData = Record<string, any>, TContext = Record<string, any>, TExtensions = Record<string, any>> = SingleExecutionResult<TData, TContext, TExtensions> | ExecutionPatchResult<TData, TExtensions>;
49
+ export declare type NextLink = (operation: Operation) => Observable<FetchResult>;
50
+ export declare type RequestHandler = (operation: Operation, forward: NextLink) => Observable<FetchResult> | null;
51
+ //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhtml/components",
3
- "version": "0.0.116",
3
+ "version": "0.0.118",
4
4
  "description": "Reactive HyperText Markup Language",
5
5
  "scripts": {
6
6
  "start": "npx parcel ./examples/index.html --out-dir build/examples",
@@ -9,11 +9,11 @@
9
9
  "clean": "git clean -dxf",
10
10
  "lint": "npx eslint . --ext .ts",
11
11
  "lint-fix": "npx eslint . --fix --ext .ts",
12
- "build": "rm -rf dist && tsc"
12
+ "build": "cp ./libs/types ../../node_modules/@apollo/client/link/core/types.d.ts && rm -rf dist && tsc"
13
13
  },
14
14
  "dependencies": {
15
- "@rxdi/lit-html": "^0.7.133",
16
- "@rhtml/renderer": "0.0.116",
15
+ "@rxdi/lit-html": "^0.7.159",
16
+ "@rhtml/renderer": "0.0.118",
17
17
  "rxjs": "^6.6.3",
18
18
  "shades": "^2.1.0"
19
19
  },
package/src/types.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import {
3
+ ErrorPolicy,
4
+ FetchPolicy,
5
+ } from '@apollo/client/core/watchQueryOptions';
2
6
  import { TemplateResult } from '@rxdi/lit-html';
3
- import { ErrorPolicy, FetchPolicy } from 'apollo-client';
4
7
  import { DocumentNode } from 'graphql';
5
8
 
6
9
  export interface Settings {