graphql-codegen-plugin-typescript-swr 0.8.4 → 0.8.6
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/README.md +5 -0
- package/build/main/config.d.ts +27 -0
- package/build/main/config.js +3 -0
- package/build/main/index.d.ts +6 -0
- package/build/main/index.js +35 -0
- package/build/main/visitor.d.ts +30 -0
- package/build/main/visitor.js +160 -0
- package/build/module/config.d.ts +27 -0
- package/build/module/config.js +2 -0
- package/build/module/index.d.ts +6 -0
- package/build/module/index.js +30 -0
- package/build/module/visitor.d.ts +30 -0
- package/build/module/visitor.js +153 -0
- package/package.json +5 -2
- package/.editorconfig +0 -13
- package/.eslintrc.js +0 -63
- package/.github/CONTRIBUTING.md +0 -3
- package/.github/ISSUE_TEMPLATE.md +0 -9
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -7
- package/.github/workflows/main.yml +0 -28
- package/.gitignore +0 -8
- package/.prettierignore +0 -3
- package/.prettierrc.json +0 -4
- package/.vscode/extensions.json +0 -8
- package/.vscode/launch.json +0 -29
- package/.vscode/settings.json +0 -41
- package/dev-test/.env +0 -1
- package/dev-test/codegen.yml +0 -357
- package/dev-test/githunt/__generated__/comment-added.subscription.stencil-component.tsx +0 -47
- package/dev-test/githunt/__generated__/comment.query.stencil-component.tsx +0 -68
- package/dev-test/githunt/__generated__/comments-page-comment.fragment.stencil-component.tsx +0 -20
- package/dev-test/githunt/__generated__/current-user.query.stencil-component.tsx +0 -34
- package/dev-test/githunt/__generated__/feed-entry.fragment.stencil-component.tsx +0 -30
- package/dev-test/githunt/__generated__/feed.query.stencil-component.tsx +0 -40
- package/dev-test/githunt/__generated__/new-entry.mutation.stencil-component.tsx +0 -35
- package/dev-test/githunt/__generated__/repo-info.fragment.stencil-component.tsx +0 -26
- package/dev-test/githunt/__generated__/submit-comment.mutation.stencil-component.tsx +0 -35
- package/dev-test/githunt/__generated__/vote-buttons.fragment.stencil-component.tsx +0 -16
- package/dev-test/githunt/__generated__/vote.mutation.stencil-component.tsx +0 -41
- package/dev-test/githunt/comment-added.subscription.graphql +0 -11
- package/dev-test/githunt/comment.query.graphql +0 -33
- package/dev-test/githunt/comments-page-comment.fragment.graphql +0 -9
- package/dev-test/githunt/current-user.query.graphql +0 -6
- package/dev-test/githunt/feed-entry.fragment.graphql +0 -13
- package/dev-test/githunt/feed.query.graphql +0 -8
- package/dev-test/githunt/flow.flow.js +0 -367
- package/dev-test/githunt/graphql-declared-modules.d.ts +0 -87
- package/dev-test/githunt/new-entry.mutation.graphql +0 -5
- package/dev-test/githunt/repo-info.fragment.graphql +0 -12
- package/dev-test/githunt/schema.js +0 -3
- package/dev-test/githunt/schema.json +0 -1750
- package/dev-test/githunt/submit-comment.mutation.graphql +0 -5
- package/dev-test/githunt/typed-document-nodes.ts +0 -892
- package/dev-test/githunt/types.apolloAngular.sdk.ts +0 -570
- package/dev-test/githunt/types.apolloAngular.ts +0 -491
- package/dev-test/githunt/types.avoidOptionals.ts +0 -266
- package/dev-test/githunt/types.d.ts +0 -261
- package/dev-test/githunt/types.enumsAsTypes.ts +0 -261
- package/dev-test/githunt/types.flatten.preResolveTypes.ts +0 -289
- package/dev-test/githunt/types.immutableTypes.ts +0 -267
- package/dev-test/githunt/types.preResolveTypes.compatibility.ts +0 -368
- package/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts +0 -156
- package/dev-test/githunt/types.preResolveTypes.ts +0 -293
- package/dev-test/githunt/types.reactApollo.customSuffix.tsx +0 -634
- package/dev-test/githunt/types.reactApollo.hooks.tsx +0 -621
- package/dev-test/githunt/types.reactApollo.preResolveTypes.tsx +0 -648
- package/dev-test/githunt/types.reactApollo.tsx +0 -621
- package/dev-test/githunt/types.reactApollo.v2.tsx +0 -635
- package/dev-test/githunt/types.stencilApollo.tsx +0 -484
- package/dev-test/githunt/types.ts +0 -266
- package/dev-test/githunt/types.urql.tsx +0 -444
- package/dev-test/githunt/types.vueApollo.ts +0 -647
- package/dev-test/githunt/vote-buttons.fragment.graphql +0 -6
- package/dev-test/githunt/vote.mutation.graphql +0 -9
- package/dev-test/setup.js +0 -3
- package/dev-test/test-message/documents.ts +0 -46
- package/dev-test/test-message/schema.graphql +0 -23
- package/dev-test/test-message/types.tsx +0 -237
- package/dev-test/test-schema/env.types.ts +0 -35
- package/dev-test/test-schema/flow-types.flow.js +0 -139
- package/dev-test/test-schema/local/schema-ast.js +0 -2
- package/dev-test/test-schema/local/schema-formats.js +0 -20
- package/dev-test/test-schema/local/schema-object.js +0 -2
- package/dev-test/test-schema/local/schema-text.js +0 -2
- package/dev-test/test-schema/local/schema.graphql +0 -8
- package/dev-test/test-schema/resolvers-federation.ts +0 -233
- package/dev-test/test-schema/resolvers-root.ts +0 -178
- package/dev-test/test-schema/resolvers-types.ts +0 -168
- package/dev-test/test-schema/schema-ast.js +0 -2
- package/dev-test/test-schema/schema-federation.graphql +0 -30
- package/dev-test/test-schema/schema-formats.js +0 -38
- package/dev-test/test-schema/schema-json.js +0 -2
- package/dev-test/test-schema/schema-object.js +0 -2
- package/dev-test/test-schema/schema-text.js +0 -2
- package/dev-test/test-schema/schema-with-imports.graphql +0 -9
- package/dev-test/test-schema/schema-with-root.graphql +0 -22
- package/dev-test/test-schema/schema.graphql +0 -19
- package/dev-test/test-schema/schema.json +0 -1070
- package/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts +0 -19
- package/dev-test/test-schema/types.preResolveTypes.ts +0 -44
- package/dev-test/test-schema/typings.avoidOptionals.ts +0 -27
- package/dev-test/test-schema/typings.enum.ts +0 -19
- package/dev-test/test-schema/typings.immutableTypes.ts +0 -27
- package/dev-test/test-schema/typings.ts +0 -156
- package/dev-test/test-schema/typings.wrapped.ts +0 -29
- package/dev-test/tsconfig.json +0 -18
- package/jest.config.js +0 -30
- package/renovate.json +0 -2
- package/src/config.ts +0 -29
- package/src/index.ts +0 -54
- package/src/visitor.ts +0 -259
- package/tests/outputs/autogenSWRKey.ts +0 -46
- package/tests/outputs/excludeQueries.ts +0 -13
- package/tests/outputs/infinite.ts +0 -49
- package/tests/outputs/mutations.ts +0 -19
- package/tests/outputs/rawRequest.ts +0 -19
- package/tests/outputs/straight.ts +0 -19
- package/tests/swr.spec.ts +0 -306
- package/tests/visitor.spec.ts +0 -19
- package/tsconfig.json +0 -32
- package/tsconfig.main.json +0 -11
- package/tsconfig.module.json +0 -13
- package/yarn-error.log +0 -5477
- package/yarn.lock +0 -5359
package/.eslintrc.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: { es6: true },
|
|
4
|
-
ignorePatterns: ['node_modules', 'build', 'coverage', 'tests/outputs'],
|
|
5
|
-
globals: { BigInt: true, console: true, WebAssembly: true },
|
|
6
|
-
overrides: [
|
|
7
|
-
{
|
|
8
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
9
|
-
extends: [
|
|
10
|
-
'airbnb-base',
|
|
11
|
-
'airbnb-typescript/base',
|
|
12
|
-
'airbnb/hooks',
|
|
13
|
-
'plugin:@typescript-eslint/recommended',
|
|
14
|
-
'plugin:import/recommended',
|
|
15
|
-
'plugin:import/typescript',
|
|
16
|
-
'prettier',
|
|
17
|
-
],
|
|
18
|
-
parserOptions: {
|
|
19
|
-
tsconfigRootDir: __dirname,
|
|
20
|
-
project: './tsconfig.json',
|
|
21
|
-
},
|
|
22
|
-
rules: {
|
|
23
|
-
'no-underscore-dangle': [
|
|
24
|
-
'error',
|
|
25
|
-
{
|
|
26
|
-
allowAfterThis: true,
|
|
27
|
-
allowAfterSuper: true,
|
|
28
|
-
allowAfterThisConstructor: true,
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
'no-restricted-imports': 'off',
|
|
32
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
33
|
-
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
34
|
-
},
|
|
35
|
-
settings: {
|
|
36
|
-
'import/parsers': {
|
|
37
|
-
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
38
|
-
},
|
|
39
|
-
'import/resolver': {
|
|
40
|
-
typescript: {
|
|
41
|
-
project: './tsconfig.json',
|
|
42
|
-
},
|
|
43
|
-
node: {
|
|
44
|
-
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json'],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
files: ['./src/lib/**/*.ts'],
|
|
51
|
-
rules: {
|
|
52
|
-
'import/prefer-default-export': 'off',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
files: ['./tests/**/*.ts'],
|
|
57
|
-
rules: {
|
|
58
|
-
'@typescript-eslint/no-var-requires': 'off',
|
|
59
|
-
'global-require': 'off',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
}
|
package/.github/CONTRIBUTING.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
- **I'm submitting a ...**
|
|
2
|
-
[ ] bug report
|
|
3
|
-
[ ] feature request
|
|
4
|
-
[ ] question about the decisions made in the repository
|
|
5
|
-
[ ] question about how to use this project
|
|
6
|
-
|
|
7
|
-
- **Summary**
|
|
8
|
-
|
|
9
|
-
- **Other information** (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
test:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
strategy:
|
|
14
|
-
matrix:
|
|
15
|
-
node-version: ['14', '16', '18']
|
|
16
|
-
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v3
|
|
19
|
-
- name: Run tests with ${{ matrix.node-version }}
|
|
20
|
-
uses: actions/setup-node@v3
|
|
21
|
-
with:
|
|
22
|
-
node-version: ${{ matrix.node-version }}
|
|
23
|
-
- name: yarn install, and test
|
|
24
|
-
run: |
|
|
25
|
-
yarn install --pure-lockfile
|
|
26
|
-
yarn test
|
|
27
|
-
env:
|
|
28
|
-
CI: true
|
package/.gitignore
DELETED
package/.prettierignore
DELETED
package/.prettierrc.json
DELETED
package/.vscode/extensions.json
DELETED
package/.vscode/launch.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.2.0",
|
|
3
|
-
"configurations": [
|
|
4
|
-
// To debug, make sure a *.spec.ts file is active in the editor, then run a configuration
|
|
5
|
-
{
|
|
6
|
-
"type": "node",
|
|
7
|
-
"request": "launch",
|
|
8
|
-
"name": "Debug Active Spec",
|
|
9
|
-
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/ava",
|
|
10
|
-
"runtimeArgs": ["debug", "--break", "--serial", "${file}"],
|
|
11
|
-
"port": 9229,
|
|
12
|
-
"outputCapture": "std",
|
|
13
|
-
"skipFiles": ["<node_internals>/**/*.js"],
|
|
14
|
-
"preLaunchTask": "npm: build"
|
|
15
|
-
// "smartStep": true
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
// Use this one if you're already running `yarn watch`
|
|
19
|
-
"type": "node",
|
|
20
|
-
"request": "launch",
|
|
21
|
-
"name": "Debug Active Spec (no build)",
|
|
22
|
-
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/ava",
|
|
23
|
-
"runtimeArgs": ["debug", "--break", "--serial", "${file}"],
|
|
24
|
-
"port": 9229,
|
|
25
|
-
"outputCapture": "std",
|
|
26
|
-
"skipFiles": ["<node_internals>/**/*.js"]
|
|
27
|
-
// "smartStep": true
|
|
28
|
-
}]
|
|
29
|
-
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"css.validate": false,
|
|
3
|
-
"editor.codeActionsOnSave": {
|
|
4
|
-
"source.fixAll.eslint": true,
|
|
5
|
-
"source.fixAll.stylelint": true
|
|
6
|
-
},
|
|
7
|
-
"editor.formatOnSave": true,
|
|
8
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
9
|
-
"html.format.enable": false,
|
|
10
|
-
"javascript.format.enable": false,
|
|
11
|
-
"json.format.enable": false,
|
|
12
|
-
"scss.validate": false,
|
|
13
|
-
"typescript.format.enable": false,
|
|
14
|
-
"[html]": {
|
|
15
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
16
|
-
},
|
|
17
|
-
"[css]": {
|
|
18
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
19
|
-
},
|
|
20
|
-
"[scss]": {
|
|
21
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
22
|
-
},
|
|
23
|
-
"[sass]": {
|
|
24
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
25
|
-
},
|
|
26
|
-
"[json]": {
|
|
27
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
28
|
-
},
|
|
29
|
-
"[javascript]": {
|
|
30
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
31
|
-
},
|
|
32
|
-
"[javascriptreact]": {
|
|
33
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
34
|
-
},
|
|
35
|
-
"[typescript]": {
|
|
36
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
37
|
-
},
|
|
38
|
-
"[typescriptreact]": {
|
|
39
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
40
|
-
}
|
|
41
|
-
}
|
package/dev-test/.env
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
SCHEMA_PATH = ./dev-test/test-schema/schema.graphql
|
package/dev-test/codegen.yml
DELETED
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
hooks:
|
|
2
|
-
afterAllFileWrite:
|
|
3
|
-
- prettier --write
|
|
4
|
-
generates:
|
|
5
|
-
./dev-test/test-schema/resolvers-types.ts:
|
|
6
|
-
schema: ./dev-test/test-schema/schema-text.js
|
|
7
|
-
plugins:
|
|
8
|
-
- typescript
|
|
9
|
-
- typescript-resolvers
|
|
10
|
-
./dev-test/test-schema/flow-types.flow.js:
|
|
11
|
-
schema: ./dev-test/test-schema/schema.json
|
|
12
|
-
plugins:
|
|
13
|
-
- flow
|
|
14
|
-
- flow-resolvers
|
|
15
|
-
./dev-test/test-schema/resolvers-root.ts:
|
|
16
|
-
schema: ./dev-test/test-schema/schema-with-root.graphql
|
|
17
|
-
plugins:
|
|
18
|
-
- typescript
|
|
19
|
-
- typescript-resolvers
|
|
20
|
-
./dev-test/test-schema/resolvers-federation.ts:
|
|
21
|
-
schema: ./dev-test/test-schema/schema-federation.graphql
|
|
22
|
-
config:
|
|
23
|
-
federation: true
|
|
24
|
-
plugins:
|
|
25
|
-
- typescript
|
|
26
|
-
- typescript-resolvers
|
|
27
|
-
./dev-test/test-schema/typings.ts:
|
|
28
|
-
schema: ./dev-test/test-schema/schema.json
|
|
29
|
-
plugins:
|
|
30
|
-
- typescript
|
|
31
|
-
- typescript-resolvers
|
|
32
|
-
./dev-test/test-schema/typings.avoidOptionals.ts:
|
|
33
|
-
schema: ./dev-test/test-schema/schema.json
|
|
34
|
-
config:
|
|
35
|
-
avoidOptionals: true
|
|
36
|
-
plugins:
|
|
37
|
-
- typescript
|
|
38
|
-
./dev-test/test-schema/typings.wrapped.ts:
|
|
39
|
-
schema: ./dev-test/test-schema/schema.json
|
|
40
|
-
plugins:
|
|
41
|
-
- add:
|
|
42
|
-
content: 'declare namespace GraphQL {'
|
|
43
|
-
- add:
|
|
44
|
-
placement: append
|
|
45
|
-
content: '}'
|
|
46
|
-
- typescript
|
|
47
|
-
- typescript-operations
|
|
48
|
-
./dev-test/test-schema/env.types.ts:
|
|
49
|
-
schema: ${SCHEMA_PATH}
|
|
50
|
-
plugins:
|
|
51
|
-
- typescript
|
|
52
|
-
./dev-test/test-schema/typings.immutableTypes.ts:
|
|
53
|
-
schema: ./dev-test/test-schema/schema.json
|
|
54
|
-
config:
|
|
55
|
-
imutableTypes: true
|
|
56
|
-
plugins:
|
|
57
|
-
- typescript
|
|
58
|
-
./dev-test/test-schema/typings.enum.ts:
|
|
59
|
-
schema: ./dev-test/test-schema/schema-object.js
|
|
60
|
-
plugins:
|
|
61
|
-
- typescript
|
|
62
|
-
./dev-test/githunt/graphql-declared-modules.d.ts:
|
|
63
|
-
schema: ./dev-test/githunt/schema.json
|
|
64
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
65
|
-
plugins:
|
|
66
|
-
- typescript-graphql-files-modules
|
|
67
|
-
./dev-test/githunt/typed-document-nodes.ts:
|
|
68
|
-
schema: ./dev-test/githunt/schema.json
|
|
69
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
70
|
-
plugins:
|
|
71
|
-
- typescript
|
|
72
|
-
- typescript-operations
|
|
73
|
-
- typed-document-node
|
|
74
|
-
./dev-test/githunt/flow.flow.js:
|
|
75
|
-
schema: ./dev-test/githunt/schema.json
|
|
76
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
77
|
-
plugins:
|
|
78
|
-
- flow
|
|
79
|
-
- flow-operations
|
|
80
|
-
./dev-test/githunt/types.ts:
|
|
81
|
-
schema: ./dev-test/githunt/schema.json
|
|
82
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
83
|
-
plugins:
|
|
84
|
-
- typescript
|
|
85
|
-
- typescript-operations
|
|
86
|
-
./dev-test/githunt/types.preResolveTypes.ts:
|
|
87
|
-
schema: ./dev-test/githunt/schema.json
|
|
88
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
89
|
-
config:
|
|
90
|
-
preResolveTypes: true
|
|
91
|
-
plugins:
|
|
92
|
-
- typescript
|
|
93
|
-
- typescript-operations
|
|
94
|
-
./dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts:
|
|
95
|
-
schema: ./dev-test/githunt/schema.json
|
|
96
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
97
|
-
config:
|
|
98
|
-
preResolveTypes: true
|
|
99
|
-
onlyOperationTypes: true
|
|
100
|
-
plugins:
|
|
101
|
-
- typescript
|
|
102
|
-
- typescript-operations
|
|
103
|
-
./dev-test/githunt/types.flatten.preResolveTypes.ts:
|
|
104
|
-
schema: ./dev-test/githunt/schema.json
|
|
105
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
106
|
-
config:
|
|
107
|
-
preResolveTypes: true
|
|
108
|
-
flattenGeneratedTypes: true
|
|
109
|
-
plugins:
|
|
110
|
-
- typescript
|
|
111
|
-
- typescript-operations
|
|
112
|
-
./dev-test/githunt/types.preResolveTypes.compatibility.ts:
|
|
113
|
-
schema: ./dev-test/githunt/schema.json
|
|
114
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
115
|
-
config:
|
|
116
|
-
preResolveTypes: true
|
|
117
|
-
plugins:
|
|
118
|
-
- typescript
|
|
119
|
-
- typescript-operations
|
|
120
|
-
- typescript-compatibility
|
|
121
|
-
./dev-test/githunt/types.enumsAsTypes.ts:
|
|
122
|
-
schema: ./dev-test/githunt/schema.json
|
|
123
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
124
|
-
config:
|
|
125
|
-
enumsAsTypes: true
|
|
126
|
-
plugins:
|
|
127
|
-
- typescript
|
|
128
|
-
- typescript-operations
|
|
129
|
-
./dev-test/githunt/types.d.ts:
|
|
130
|
-
schema: ./dev-test/githunt/schema.json
|
|
131
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
132
|
-
config:
|
|
133
|
-
enumsAsTypes: true
|
|
134
|
-
plugins:
|
|
135
|
-
- typescript
|
|
136
|
-
- typescript-operations
|
|
137
|
-
./dev-test/githunt/types.avoidOptionals.ts:
|
|
138
|
-
schema: ./dev-test/githunt/schema.json
|
|
139
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
140
|
-
config:
|
|
141
|
-
avoidOptionals: true
|
|
142
|
-
plugins:
|
|
143
|
-
- typescript
|
|
144
|
-
- typescript-operations
|
|
145
|
-
./dev-test/githunt/types.immutableTypes.ts:
|
|
146
|
-
schema: ./dev-test/githunt/schema.json
|
|
147
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
148
|
-
config:
|
|
149
|
-
immutableTypes: true
|
|
150
|
-
plugins:
|
|
151
|
-
- typescript
|
|
152
|
-
- typescript-operations
|
|
153
|
-
./dev-test/githunt/types.reactApollo.tsx:
|
|
154
|
-
schema: ./dev-test/githunt/schema.json
|
|
155
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
156
|
-
plugins:
|
|
157
|
-
- typescript
|
|
158
|
-
- typescript-operations
|
|
159
|
-
- typescript-react-apollo
|
|
160
|
-
./dev-test/githunt/types.reactApollo.v2.tsx:
|
|
161
|
-
schema: ./dev-test/githunt/schema.json
|
|
162
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
163
|
-
config:
|
|
164
|
-
reactApolloVersion: 2
|
|
165
|
-
plugins:
|
|
166
|
-
- typescript
|
|
167
|
-
- typescript-operations
|
|
168
|
-
- typescript-react-apollo
|
|
169
|
-
./dev-test/githunt/types.reactApollo.customSuffix.tsx:
|
|
170
|
-
schema: ./dev-test/githunt/schema.json
|
|
171
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
172
|
-
config:
|
|
173
|
-
operationResultSuffix: MyOperation
|
|
174
|
-
plugins:
|
|
175
|
-
- typescript
|
|
176
|
-
- typescript-operations
|
|
177
|
-
- typescript-react-apollo
|
|
178
|
-
./dev-test/githunt/types.reactApollo.preResolveTypes.tsx:
|
|
179
|
-
schema: ./dev-test/githunt/schema.json
|
|
180
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
181
|
-
config:
|
|
182
|
-
preResolveTypes: true
|
|
183
|
-
plugins:
|
|
184
|
-
- typescript
|
|
185
|
-
- typescript-operations
|
|
186
|
-
- typescript-react-apollo
|
|
187
|
-
./dev-test/githunt/types.reactApollo.hooks.tsx:
|
|
188
|
-
schema: ./dev-test/githunt/schema.json
|
|
189
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
190
|
-
plugins:
|
|
191
|
-
- typescript
|
|
192
|
-
- typescript-operations
|
|
193
|
-
- typescript-react-apollo
|
|
194
|
-
./dev-test/githunt/types.apolloAngular.ts:
|
|
195
|
-
schema: ./dev-test/githunt/schema.json
|
|
196
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
197
|
-
plugins:
|
|
198
|
-
- typescript
|
|
199
|
-
- typescript-operations
|
|
200
|
-
- typescript-apollo-angular
|
|
201
|
-
./dev-test/githunt/types.apolloAngular.sdk.ts:
|
|
202
|
-
schema: ./dev-test/githunt/schema.json
|
|
203
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
204
|
-
config:
|
|
205
|
-
sdkClass: true
|
|
206
|
-
plugins:
|
|
207
|
-
- typescript
|
|
208
|
-
- typescript-operations
|
|
209
|
-
- typescript-apollo-angular
|
|
210
|
-
./dev-test/githunt/types.stencilApollo.tsx:
|
|
211
|
-
schema: ./dev-test/githunt/schema.json
|
|
212
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
213
|
-
plugins:
|
|
214
|
-
- typescript
|
|
215
|
-
- typescript-operations
|
|
216
|
-
- typescript-stencil-apollo
|
|
217
|
-
./dev-test/githunt/types.urql.tsx:
|
|
218
|
-
schema: ./dev-test/githunt/schema.json
|
|
219
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
220
|
-
plugins:
|
|
221
|
-
- typescript
|
|
222
|
-
- typescript-operations
|
|
223
|
-
- typescript-urql
|
|
224
|
-
./dev-test/githunt:
|
|
225
|
-
schema: ./dev-test/githunt/schema.json
|
|
226
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
227
|
-
preset: near-operation-file
|
|
228
|
-
presetConfig:
|
|
229
|
-
extension: .stencil-component.tsx
|
|
230
|
-
folder: __generated__
|
|
231
|
-
baseTypesPath: types.d.ts
|
|
232
|
-
plugins:
|
|
233
|
-
- typescript-operations
|
|
234
|
-
- typescript-stencil-apollo
|
|
235
|
-
config:
|
|
236
|
-
componentType: class
|
|
237
|
-
globalNamespace: true
|
|
238
|
-
./dev-test/githunt/types.vueApollo.ts:
|
|
239
|
-
schema: ./dev-test/githunt/schema.json
|
|
240
|
-
documents: ./dev-test/githunt/**/*.graphql
|
|
241
|
-
plugins:
|
|
242
|
-
- typescript
|
|
243
|
-
- typescript-operations
|
|
244
|
-
- typescript-vue-apollo
|
|
245
|
-
./dev-test/star-wars/types.ts:
|
|
246
|
-
schema: ./dev-test/star-wars/schema.json
|
|
247
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
248
|
-
plugins:
|
|
249
|
-
- typescript
|
|
250
|
-
- typescript-operations
|
|
251
|
-
./dev-test/star-wars/types.preResolveTypes.ts:
|
|
252
|
-
schema: ./dev-test/star-wars/schema.json
|
|
253
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
254
|
-
config:
|
|
255
|
-
preResolveTypes: true
|
|
256
|
-
plugins:
|
|
257
|
-
- typescript
|
|
258
|
-
- typescript-operations
|
|
259
|
-
./dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts:
|
|
260
|
-
schema: ./dev-test/star-wars/schema.json
|
|
261
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
262
|
-
config:
|
|
263
|
-
preResolveTypes: true
|
|
264
|
-
onlyOperationTypes: true
|
|
265
|
-
plugins:
|
|
266
|
-
- typescript
|
|
267
|
-
- typescript-operations
|
|
268
|
-
./dev-test/test-schema/types.preResolveTypes.ts:
|
|
269
|
-
schema: ./dev-test/test-schema/schema.graphql
|
|
270
|
-
documents:
|
|
271
|
-
- 'query test { testArr1 testArr2 testArr3 }'
|
|
272
|
-
config:
|
|
273
|
-
preResolveTypes: true
|
|
274
|
-
plugins:
|
|
275
|
-
- typescript
|
|
276
|
-
- typescript-operations
|
|
277
|
-
./dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts:
|
|
278
|
-
schema: ./dev-test/test-schema/schema.graphql
|
|
279
|
-
documents:
|
|
280
|
-
- 'query test { testArr1 testArr2 testArr3 }'
|
|
281
|
-
config:
|
|
282
|
-
preResolveTypes: true
|
|
283
|
-
onlyOperationTypes: true
|
|
284
|
-
plugins:
|
|
285
|
-
- typescript
|
|
286
|
-
- typescript-operations
|
|
287
|
-
./dev-test/star-wars/types.d.ts:
|
|
288
|
-
schema: ./dev-test/star-wars/schema.json
|
|
289
|
-
config:
|
|
290
|
-
enumsAsTypes: true
|
|
291
|
-
plugins:
|
|
292
|
-
- typescript
|
|
293
|
-
- typescript-operations
|
|
294
|
-
./dev-test/star-wars:
|
|
295
|
-
schema: ./dev-test/star-wars/schema.json
|
|
296
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
297
|
-
preset: near-operation-file
|
|
298
|
-
presetConfig:
|
|
299
|
-
extension: .tsx
|
|
300
|
-
folder: __generated__
|
|
301
|
-
baseTypesPath: types.d.ts
|
|
302
|
-
plugins:
|
|
303
|
-
- typescript-operations
|
|
304
|
-
- typescript-react-apollo
|
|
305
|
-
./dev-test/star-wars/types.globallyAvailable.d.ts:
|
|
306
|
-
schema: ./dev-test/star-wars/schema.json
|
|
307
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
308
|
-
config:
|
|
309
|
-
enumsAsTypes: true
|
|
310
|
-
noExport: true
|
|
311
|
-
plugins:
|
|
312
|
-
- typescript
|
|
313
|
-
- typescript-operations
|
|
314
|
-
./dev-test/star-wars/types.avoidOptionals.ts:
|
|
315
|
-
schema: ./dev-test/star-wars/schema.json
|
|
316
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
317
|
-
config:
|
|
318
|
-
avoidOptionals: true
|
|
319
|
-
plugins:
|
|
320
|
-
- typescript
|
|
321
|
-
- typescript-operations
|
|
322
|
-
./dev-test/star-wars/types.immutableTypes.ts:
|
|
323
|
-
schema: ./dev-test/star-wars/schema.json
|
|
324
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
325
|
-
config:
|
|
326
|
-
immutableTypes: true
|
|
327
|
-
plugins:
|
|
328
|
-
- typescript
|
|
329
|
-
- typescript-operations
|
|
330
|
-
./dev-test/star-wars/types.skipSchema.ts:
|
|
331
|
-
schema: ./dev-test/star-wars/schema.json
|
|
332
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
333
|
-
plugins:
|
|
334
|
-
- typescript
|
|
335
|
-
- typescript-operations
|
|
336
|
-
./dev-test/star-wars/types.refetchFn.tsx:
|
|
337
|
-
schema: ./dev-test/star-wars/schema.json
|
|
338
|
-
documents: ./dev-test/star-wars/**/*.graphql
|
|
339
|
-
plugins:
|
|
340
|
-
- typescript
|
|
341
|
-
- typescript-react-apollo
|
|
342
|
-
config:
|
|
343
|
-
withRefetchFn: true
|
|
344
|
-
./dev-test/test-message/types.tsx:
|
|
345
|
-
schema: ./dev-test/test-message/schema.graphql
|
|
346
|
-
documents: ./dev-test/test-message/documents.ts
|
|
347
|
-
plugins:
|
|
348
|
-
- typescript
|
|
349
|
-
- typescript-operations
|
|
350
|
-
- typescript-react-apollo
|
|
351
|
-
config:
|
|
352
|
-
documentMode: external
|
|
353
|
-
importDocumentNodeExternallyFrom: './documents.ts'
|
|
354
|
-
reactApolloVersion: 3
|
|
355
|
-
gqlImport: graphql-tag
|
|
356
|
-
hooksImportFrom: '@apollo/react-hooks'
|
|
357
|
-
withMutationFn: false
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag';
|
|
2
|
-
import 'stencil-apollo';
|
|
3
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
4
|
-
|
|
5
|
-
declare global {
|
|
6
|
-
export type OnCommentAddedSubscriptionVariables = Types.Exact<{
|
|
7
|
-
repoFullName: Types.Scalars['String'];
|
|
8
|
-
}>;
|
|
9
|
-
|
|
10
|
-
export type OnCommentAddedSubscription = { __typename?: 'Subscription' } & {
|
|
11
|
-
commentAdded?: Types.Maybe<
|
|
12
|
-
{ __typename?: 'Comment' } & Pick<Types.Comment, 'id' | 'createdAt' | 'content'> & {
|
|
13
|
-
postedBy: { __typename?: 'User' } & Pick<Types.User, 'login' | 'html_url'>;
|
|
14
|
-
}
|
|
15
|
-
>;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const OnCommentAddedDocument = gql`
|
|
20
|
-
subscription onCommentAdded($repoFullName: String!) {
|
|
21
|
-
commentAdded(repoFullName: $repoFullName) {
|
|
22
|
-
id
|
|
23
|
-
postedBy {
|
|
24
|
-
login
|
|
25
|
-
html_url
|
|
26
|
-
}
|
|
27
|
-
createdAt
|
|
28
|
-
content
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
@Component({
|
|
34
|
-
tag: 'apollo-on-comment-added',
|
|
35
|
-
})
|
|
36
|
-
export class OnCommentAddedComponent {
|
|
37
|
-
@Prop() renderer: import('stencil-apollo').SubscriptionRenderer<
|
|
38
|
-
OnCommentAddedSubscription,
|
|
39
|
-
OnCommentAddedSubscriptionVariables
|
|
40
|
-
>;
|
|
41
|
-
@Prop() variables: OnCommentAddedSubscriptionVariables;
|
|
42
|
-
render() {
|
|
43
|
-
return (
|
|
44
|
-
<apollo-subscription subscription={OnCommentAddedDocument} variables={this.variables} renderer={this.renderer} />
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag';
|
|
2
|
-
import { CommentsPageCommentFragmentDoc } from './comments-page-comment.fragment.stencil-component';
|
|
3
|
-
import 'stencil-apollo';
|
|
4
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
5
|
-
|
|
6
|
-
declare global {
|
|
7
|
-
export type CommentQueryVariables = Types.Exact<{
|
|
8
|
-
repoFullName: Types.Scalars['String'];
|
|
9
|
-
limit?: Types.Maybe<Types.Scalars['Int']>;
|
|
10
|
-
offset?: Types.Maybe<Types.Scalars['Int']>;
|
|
11
|
-
}>;
|
|
12
|
-
|
|
13
|
-
export type CommentQuery = { __typename?: 'Query' } & {
|
|
14
|
-
currentUser?: Types.Maybe<{ __typename?: 'User' } & Pick<Types.User, 'login' | 'html_url'>>;
|
|
15
|
-
entry?: Types.Maybe<
|
|
16
|
-
{ __typename?: 'Entry' } & Pick<Types.Entry, 'id' | 'createdAt' | 'commentCount'> & {
|
|
17
|
-
postedBy: { __typename?: 'User' } & Pick<Types.User, 'login' | 'html_url'>;
|
|
18
|
-
comments: Array<Types.Maybe<{ __typename?: 'Comment' } & CommentsPageCommentFragment>>;
|
|
19
|
-
repository: { __typename?: 'Repository' } & Pick<
|
|
20
|
-
Types.Repository,
|
|
21
|
-
'description' | 'open_issues_count' | 'stargazers_count' | 'full_name' | 'html_url'
|
|
22
|
-
>;
|
|
23
|
-
}
|
|
24
|
-
>;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const CommentDocument = gql`
|
|
29
|
-
query Comment($repoFullName: String!, $limit: Int, $offset: Int) {
|
|
30
|
-
currentUser {
|
|
31
|
-
login
|
|
32
|
-
html_url
|
|
33
|
-
}
|
|
34
|
-
entry(repoFullName: $repoFullName) {
|
|
35
|
-
id
|
|
36
|
-
postedBy {
|
|
37
|
-
login
|
|
38
|
-
html_url
|
|
39
|
-
}
|
|
40
|
-
createdAt
|
|
41
|
-
comments(limit: $limit, offset: $offset) {
|
|
42
|
-
...CommentsPageComment
|
|
43
|
-
}
|
|
44
|
-
commentCount
|
|
45
|
-
repository {
|
|
46
|
-
full_name
|
|
47
|
-
html_url
|
|
48
|
-
... on Repository {
|
|
49
|
-
description
|
|
50
|
-
open_issues_count
|
|
51
|
-
stargazers_count
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
${CommentsPageCommentFragmentDoc}
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
@Component({
|
|
60
|
-
tag: 'apollo-comment',
|
|
61
|
-
})
|
|
62
|
-
export class CommentComponent {
|
|
63
|
-
@Prop() renderer: import('stencil-apollo').QueryRenderer<CommentQuery, CommentQueryVariables>;
|
|
64
|
-
@Prop() variables: CommentQueryVariables;
|
|
65
|
-
render() {
|
|
66
|
-
return <apollo-query query={CommentDocument} variables={this.variables} renderer={this.renderer} />;
|
|
67
|
-
}
|
|
68
|
-
}
|