Skip to content

Commit 5117a66

Browse files
committed
fix(graphql): client bumped to newer version and build fixed
1 parent 7ad2f89 commit 5117a66

File tree

19 files changed

+398
-2557
lines changed

19 files changed

+398
-2557
lines changed

examples/package-lock.json

Lines changed: 237 additions & 2504 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"start-performance": "npx parcel ./performance/index.html --out-dir build/performance"
88
},
99
"dependencies": {
10-
"@rhtml/components": "0.0.82",
11-
"@rhtml/experiments": "0.0.82",
12-
"@rhtml/graphql": "0.0.82",
13-
"@rhtml/hooks": "0.0.82",
14-
"@rhtml/operators": "0.0.82",
15-
"@rhtml/renderer": "0.0.82",
16-
"@rxdi/core": "^0.7.158",
17-
"@rxdi/lit-html": "^0.7.158",
10+
"@rhtml/components": "^0.0.117",
11+
"@rhtml/experiments": "0.0.117",
12+
"@rhtml/graphql": "0.0.117",
13+
"@rhtml/hooks": "0.0.117",
14+
"@rhtml/operators": "^0.0.117",
15+
"@rhtml/renderer": "0.0.117",
16+
"@rxdi/core": "^0.7.159",
17+
"@rxdi/lit-html": "^0.7.159",
1818
"rxjs": "^6.6.3"
1919
},
2020
"browserslist": [

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@
5959
"module": "./dist/index.js",
6060
"typings": "./dist/index.d.ts",
6161
"dependencies": {
62-
"@rxdi/core": "^0.7.158",
63-
"@rxdi/graphql-client": "^0.7.158",
64-
"@rxdi/lit-html": "^0.7.158",
62+
"@rxdi/core": "^0.7.159",
63+
"@rxdi/graphql-client": "^0.7.159",
64+
"@rxdi/lit-html": "^0.7.159",
6565
"shades": "^2.1.0",
6666
"rxjs": "^6.6.3",
6767
"graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0",
68-
"graphql-tag": "^2.10.1"
68+
"graphql-tag": "^2.12.6"
6969
}
7070
}

packages/component/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"url": "git@github.com:rhtml/rhtml.git"
1717
},
1818
"dependencies": {
19-
"@rxdi/lit-html": "^0.7.158",
19+
"@rxdi/lit-html": "^0.7.159",
2020
"@rhtml/renderer": "0.0.117"
2121
},
2222
"peerDependencies": {

packages/components/libs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

packages/components/libs/types

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

packages/components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"clean": "git clean -dxf",
1010
"lint": "npx eslint . --ext .ts",
1111
"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"
1313
},
1414
"dependencies": {
15-
"@rxdi/lit-html": "^0.7.158",
15+
"@rxdi/lit-html": "^0.7.159",
1616
"@rhtml/renderer": "0.0.117",
1717
"rxjs": "^6.6.3",
1818
"shades": "^2.1.0"

packages/components/src/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
2+
import {
3+
ErrorPolicy,
4+
FetchPolicy,
5+
} from '@apollo/client/core/watchQueryOptions';
26
import { TemplateResult } from '@rxdi/lit-html';
3-
import { ErrorPolicy, FetchPolicy } from 'apollo-client';
47
import { DocumentNode } from 'graphql';
58

69
export interface Settings {

packages/experiments/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"author": "Kristiyan Tachev",
2020
"license": "MIT",
2121
"dependencies": {
22-
"@rxdi/lit-html": "^0.7.158",
22+
"@rxdi/lit-html": "^0.7.159",
2323
"@rhtml/operators": "0.0.117"
2424
},
2525
"browserslist": [

packages/graphql/libs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)