graphql-codegen-plugin-typescript-swr 0.8.5 → 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.
Files changed (113) hide show
  1. package/README.md +5 -0
  2. package/package.json +5 -2
  3. package/.editorconfig +0 -13
  4. package/.eslintrc.js +0 -63
  5. package/.github/CONTRIBUTING.md +0 -3
  6. package/.github/ISSUE_TEMPLATE.md +0 -9
  7. package/.github/PULL_REQUEST_TEMPLATE.md +0 -7
  8. package/.github/workflows/main.yml +0 -28
  9. package/.gitignore +0 -8
  10. package/.prettierignore +0 -3
  11. package/.prettierrc.json +0 -4
  12. package/.vscode/extensions.json +0 -8
  13. package/.vscode/launch.json +0 -29
  14. package/.vscode/settings.json +0 -41
  15. package/build/tsconfig.main.tsbuildinfo +0 -1
  16. package/build/tsconfig.module.tsbuildinfo +0 -1
  17. package/dev-test/.env +0 -1
  18. package/dev-test/codegen.yml +0 -357
  19. package/dev-test/githunt/__generated__/comment-added.subscription.stencil-component.tsx +0 -47
  20. package/dev-test/githunt/__generated__/comment.query.stencil-component.tsx +0 -68
  21. package/dev-test/githunt/__generated__/comments-page-comment.fragment.stencil-component.tsx +0 -20
  22. package/dev-test/githunt/__generated__/current-user.query.stencil-component.tsx +0 -34
  23. package/dev-test/githunt/__generated__/feed-entry.fragment.stencil-component.tsx +0 -30
  24. package/dev-test/githunt/__generated__/feed.query.stencil-component.tsx +0 -40
  25. package/dev-test/githunt/__generated__/new-entry.mutation.stencil-component.tsx +0 -35
  26. package/dev-test/githunt/__generated__/repo-info.fragment.stencil-component.tsx +0 -26
  27. package/dev-test/githunt/__generated__/submit-comment.mutation.stencil-component.tsx +0 -35
  28. package/dev-test/githunt/__generated__/vote-buttons.fragment.stencil-component.tsx +0 -16
  29. package/dev-test/githunt/__generated__/vote.mutation.stencil-component.tsx +0 -41
  30. package/dev-test/githunt/comment-added.subscription.graphql +0 -11
  31. package/dev-test/githunt/comment.query.graphql +0 -33
  32. package/dev-test/githunt/comments-page-comment.fragment.graphql +0 -9
  33. package/dev-test/githunt/current-user.query.graphql +0 -6
  34. package/dev-test/githunt/feed-entry.fragment.graphql +0 -13
  35. package/dev-test/githunt/feed.query.graphql +0 -8
  36. package/dev-test/githunt/flow.flow.js +0 -367
  37. package/dev-test/githunt/graphql-declared-modules.d.ts +0 -87
  38. package/dev-test/githunt/new-entry.mutation.graphql +0 -5
  39. package/dev-test/githunt/repo-info.fragment.graphql +0 -12
  40. package/dev-test/githunt/schema.js +0 -3
  41. package/dev-test/githunt/schema.json +0 -1750
  42. package/dev-test/githunt/submit-comment.mutation.graphql +0 -5
  43. package/dev-test/githunt/typed-document-nodes.ts +0 -892
  44. package/dev-test/githunt/types.apolloAngular.sdk.ts +0 -570
  45. package/dev-test/githunt/types.apolloAngular.ts +0 -491
  46. package/dev-test/githunt/types.avoidOptionals.ts +0 -266
  47. package/dev-test/githunt/types.d.ts +0 -261
  48. package/dev-test/githunt/types.enumsAsTypes.ts +0 -261
  49. package/dev-test/githunt/types.flatten.preResolveTypes.ts +0 -289
  50. package/dev-test/githunt/types.immutableTypes.ts +0 -267
  51. package/dev-test/githunt/types.preResolveTypes.compatibility.ts +0 -368
  52. package/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts +0 -156
  53. package/dev-test/githunt/types.preResolveTypes.ts +0 -293
  54. package/dev-test/githunt/types.reactApollo.customSuffix.tsx +0 -634
  55. package/dev-test/githunt/types.reactApollo.hooks.tsx +0 -621
  56. package/dev-test/githunt/types.reactApollo.preResolveTypes.tsx +0 -648
  57. package/dev-test/githunt/types.reactApollo.tsx +0 -621
  58. package/dev-test/githunt/types.reactApollo.v2.tsx +0 -635
  59. package/dev-test/githunt/types.stencilApollo.tsx +0 -484
  60. package/dev-test/githunt/types.ts +0 -266
  61. package/dev-test/githunt/types.urql.tsx +0 -444
  62. package/dev-test/githunt/types.vueApollo.ts +0 -647
  63. package/dev-test/githunt/vote-buttons.fragment.graphql +0 -6
  64. package/dev-test/githunt/vote.mutation.graphql +0 -9
  65. package/dev-test/setup.js +0 -3
  66. package/dev-test/test-message/documents.ts +0 -46
  67. package/dev-test/test-message/schema.graphql +0 -23
  68. package/dev-test/test-message/types.tsx +0 -237
  69. package/dev-test/test-schema/env.types.ts +0 -35
  70. package/dev-test/test-schema/flow-types.flow.js +0 -139
  71. package/dev-test/test-schema/local/schema-ast.js +0 -2
  72. package/dev-test/test-schema/local/schema-formats.js +0 -20
  73. package/dev-test/test-schema/local/schema-object.js +0 -2
  74. package/dev-test/test-schema/local/schema-text.js +0 -2
  75. package/dev-test/test-schema/local/schema.graphql +0 -8
  76. package/dev-test/test-schema/resolvers-federation.ts +0 -233
  77. package/dev-test/test-schema/resolvers-root.ts +0 -178
  78. package/dev-test/test-schema/resolvers-types.ts +0 -168
  79. package/dev-test/test-schema/schema-ast.js +0 -2
  80. package/dev-test/test-schema/schema-federation.graphql +0 -30
  81. package/dev-test/test-schema/schema-formats.js +0 -38
  82. package/dev-test/test-schema/schema-json.js +0 -2
  83. package/dev-test/test-schema/schema-object.js +0 -2
  84. package/dev-test/test-schema/schema-text.js +0 -2
  85. package/dev-test/test-schema/schema-with-imports.graphql +0 -9
  86. package/dev-test/test-schema/schema-with-root.graphql +0 -22
  87. package/dev-test/test-schema/schema.graphql +0 -19
  88. package/dev-test/test-schema/schema.json +0 -1070
  89. package/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts +0 -19
  90. package/dev-test/test-schema/types.preResolveTypes.ts +0 -44
  91. package/dev-test/test-schema/typings.avoidOptionals.ts +0 -27
  92. package/dev-test/test-schema/typings.enum.ts +0 -19
  93. package/dev-test/test-schema/typings.immutableTypes.ts +0 -27
  94. package/dev-test/test-schema/typings.ts +0 -156
  95. package/dev-test/test-schema/typings.wrapped.ts +0 -29
  96. package/dev-test/tsconfig.json +0 -18
  97. package/jest.config.js +0 -30
  98. package/renovate.json +0 -2
  99. package/src/config.ts +0 -29
  100. package/src/index.ts +0 -54
  101. package/src/visitor.ts +0 -259
  102. package/tests/outputs/autogenSWRKey.ts +0 -46
  103. package/tests/outputs/excludeQueries.ts +0 -13
  104. package/tests/outputs/infinite.ts +0 -49
  105. package/tests/outputs/mutations.ts +0 -19
  106. package/tests/outputs/rawRequest.ts +0 -19
  107. package/tests/outputs/straight.ts +0 -19
  108. package/tests/swr.spec.ts +0 -306
  109. package/tests/visitor.spec.ts +0 -19
  110. package/tsconfig.json +0 -32
  111. package/tsconfig.main.json +0 -11
  112. package/tsconfig.module.json +0 -13
  113. package/yarn.lock +0 -5359
@@ -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
- }
@@ -1,20 +0,0 @@
1
- import gql from 'graphql-tag';
2
-
3
- declare global {
4
- export type CommentsPageCommentFragment = { __typename?: 'Comment' } & Pick<
5
- Types.Comment,
6
- 'id' | 'createdAt' | 'content'
7
- > & { postedBy: { __typename?: 'User' } & Pick<Types.User, 'login' | 'html_url'> };
8
- }
9
-
10
- export const CommentsPageCommentFragmentDoc = gql`
11
- fragment CommentsPageComment on Comment {
12
- id
13
- postedBy {
14
- login
15
- html_url
16
- }
17
- createdAt
18
- content
19
- }
20
- `;
@@ -1,34 +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 CurrentUserForProfileQueryVariables = Types.Exact<{ [key: string]: never }>;
7
-
8
- export type CurrentUserForProfileQuery = { __typename?: 'Query' } & {
9
- currentUser?: Types.Maybe<{ __typename?: 'User' } & Pick<Types.User, 'login' | 'avatar_url'>>;
10
- };
11
- }
12
-
13
- const CurrentUserForProfileDocument = gql`
14
- query CurrentUserForProfile {
15
- currentUser {
16
- login
17
- avatar_url
18
- }
19
- }
20
- `;
21
-
22
- @Component({
23
- tag: 'apollo-current-user-for-profile',
24
- })
25
- export class CurrentUserForProfileComponent {
26
- @Prop() renderer: import('stencil-apollo').QueryRenderer<
27
- CurrentUserForProfileQuery,
28
- CurrentUserForProfileQueryVariables
29
- >;
30
- @Prop() variables: CurrentUserForProfileQueryVariables;
31
- render() {
32
- return <apollo-query query={CurrentUserForProfileDocument} variables={this.variables} renderer={this.renderer} />;
33
- }
34
- }
@@ -1,30 +0,0 @@
1
- import gql from 'graphql-tag';
2
- import { VoteButtonsFragmentDoc } from './vote-buttons.fragment.stencil-component';
3
- import { RepoInfoFragmentDoc } from './repo-info.fragment.stencil-component';
4
-
5
- declare global {
6
- export type FeedEntryFragment = { __typename?: 'Entry' } & Pick<Types.Entry, 'id' | 'commentCount'> & {
7
- repository: { __typename?: 'Repository' } & Pick<Types.Repository, 'full_name' | 'html_url'> & {
8
- owner?: Types.Maybe<{ __typename?: 'User' } & Pick<Types.User, 'avatar_url'>>;
9
- };
10
- } & VoteButtonsFragment &
11
- RepoInfoFragment;
12
- }
13
-
14
- export const FeedEntryFragmentDoc = gql`
15
- fragment FeedEntry on Entry {
16
- id
17
- commentCount
18
- repository {
19
- full_name
20
- html_url
21
- owner {
22
- avatar_url
23
- }
24
- }
25
- ...VoteButtons
26
- ...RepoInfo
27
- }
28
- ${VoteButtonsFragmentDoc}
29
- ${RepoInfoFragmentDoc}
30
- `;
@@ -1,40 +0,0 @@
1
- import gql from 'graphql-tag';
2
- import { FeedEntryFragmentDoc } from './feed-entry.fragment.stencil-component';
3
- import 'stencil-apollo';
4
- import { Component, Prop, h } from '@stencil/core';
5
-
6
- declare global {
7
- export type FeedQueryVariables = Types.Exact<{
8
- type: Types.FeedType;
9
- offset?: Types.Maybe<Types.Scalars['Int']>;
10
- limit?: Types.Maybe<Types.Scalars['Int']>;
11
- }>;
12
-
13
- export type FeedQuery = { __typename?: 'Query' } & {
14
- currentUser?: Types.Maybe<{ __typename?: 'User' } & Pick<Types.User, 'login'>>;
15
- feed?: Types.Maybe<Array<Types.Maybe<{ __typename?: 'Entry' } & FeedEntryFragment>>>;
16
- };
17
- }
18
-
19
- const FeedDocument = gql`
20
- query Feed($type: FeedType!, $offset: Int, $limit: Int) {
21
- currentUser {
22
- login
23
- }
24
- feed(type: $type, offset: $offset, limit: $limit) {
25
- ...FeedEntry
26
- }
27
- }
28
- ${FeedEntryFragmentDoc}
29
- `;
30
-
31
- @Component({
32
- tag: 'apollo-feed',
33
- })
34
- export class FeedComponent {
35
- @Prop() renderer: import('stencil-apollo').QueryRenderer<FeedQuery, FeedQueryVariables>;
36
- @Prop() variables: FeedQueryVariables;
37
- render() {
38
- return <apollo-query query={FeedDocument} variables={this.variables} renderer={this.renderer} />;
39
- }
40
- }
@@ -1,35 +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 SubmitRepositoryMutationVariables = Types.Exact<{
7
- repoFullName: Types.Scalars['String'];
8
- }>;
9
-
10
- export type SubmitRepositoryMutation = { __typename?: 'Mutation' } & {
11
- submitRepository?: Types.Maybe<{ __typename?: 'Entry' } & Pick<Types.Entry, 'createdAt'>>;
12
- };
13
- }
14
-
15
- const SubmitRepositoryDocument = gql`
16
- mutation submitRepository($repoFullName: String!) {
17
- submitRepository(repoFullName: $repoFullName) {
18
- createdAt
19
- }
20
- }
21
- `;
22
-
23
- @Component({
24
- tag: 'apollo-submit-repository',
25
- })
26
- export class SubmitRepositoryComponent {
27
- @Prop() renderer: import('stencil-apollo').MutationRenderer<
28
- SubmitRepositoryMutation,
29
- SubmitRepositoryMutationVariables
30
- >;
31
- @Prop() variables: SubmitRepositoryMutationVariables;
32
- render() {
33
- return <apollo-mutation mutation={SubmitRepositoryDocument} variables={this.variables} renderer={this.renderer} />;
34
- }
35
- }
@@ -1,26 +0,0 @@
1
- import gql from 'graphql-tag';
2
-
3
- declare global {
4
- export type RepoInfoFragment = { __typename?: 'Entry' } & Pick<Types.Entry, 'createdAt'> & {
5
- repository: { __typename?: 'Repository' } & Pick<
6
- Types.Repository,
7
- 'description' | 'stargazers_count' | 'open_issues_count'
8
- >;
9
- postedBy: { __typename?: 'User' } & Pick<Types.User, 'html_url' | 'login'>;
10
- };
11
- }
12
-
13
- export const RepoInfoFragmentDoc = gql`
14
- fragment RepoInfo on Entry {
15
- createdAt
16
- repository {
17
- description
18
- stargazers_count
19
- open_issues_count
20
- }
21
- postedBy {
22
- html_url
23
- login
24
- }
25
- }
26
- `;
@@ -1,35 +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 SubmitCommentMutationVariables = Types.Exact<{
8
- repoFullName: Types.Scalars['String'];
9
- commentContent: Types.Scalars['String'];
10
- }>;
11
-
12
- export type SubmitCommentMutation = { __typename?: 'Mutation' } & {
13
- submitComment?: Types.Maybe<{ __typename?: 'Comment' } & CommentsPageCommentFragment>;
14
- };
15
- }
16
-
17
- const SubmitCommentDocument = gql`
18
- mutation submitComment($repoFullName: String!, $commentContent: String!) {
19
- submitComment(repoFullName: $repoFullName, commentContent: $commentContent) {
20
- ...CommentsPageComment
21
- }
22
- }
23
- ${CommentsPageCommentFragmentDoc}
24
- `;
25
-
26
- @Component({
27
- tag: 'apollo-submit-comment',
28
- })
29
- export class SubmitCommentComponent {
30
- @Prop() renderer: import('stencil-apollo').MutationRenderer<SubmitCommentMutation, SubmitCommentMutationVariables>;
31
- @Prop() variables: SubmitCommentMutationVariables;
32
- render() {
33
- return <apollo-mutation mutation={SubmitCommentDocument} variables={this.variables} renderer={this.renderer} />;
34
- }
35
- }