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.
Files changed (124) hide show
  1. package/README.md +5 -0
  2. package/build/main/config.d.ts +27 -0
  3. package/build/main/config.js +3 -0
  4. package/build/main/index.d.ts +6 -0
  5. package/build/main/index.js +35 -0
  6. package/build/main/visitor.d.ts +30 -0
  7. package/build/main/visitor.js +160 -0
  8. package/build/module/config.d.ts +27 -0
  9. package/build/module/config.js +2 -0
  10. package/build/module/index.d.ts +6 -0
  11. package/build/module/index.js +30 -0
  12. package/build/module/visitor.d.ts +30 -0
  13. package/build/module/visitor.js +153 -0
  14. package/package.json +5 -2
  15. package/.editorconfig +0 -13
  16. package/.eslintrc.js +0 -63
  17. package/.github/CONTRIBUTING.md +0 -3
  18. package/.github/ISSUE_TEMPLATE.md +0 -9
  19. package/.github/PULL_REQUEST_TEMPLATE.md +0 -7
  20. package/.github/workflows/main.yml +0 -28
  21. package/.gitignore +0 -8
  22. package/.prettierignore +0 -3
  23. package/.prettierrc.json +0 -4
  24. package/.vscode/extensions.json +0 -8
  25. package/.vscode/launch.json +0 -29
  26. package/.vscode/settings.json +0 -41
  27. package/dev-test/.env +0 -1
  28. package/dev-test/codegen.yml +0 -357
  29. package/dev-test/githunt/__generated__/comment-added.subscription.stencil-component.tsx +0 -47
  30. package/dev-test/githunt/__generated__/comment.query.stencil-component.tsx +0 -68
  31. package/dev-test/githunt/__generated__/comments-page-comment.fragment.stencil-component.tsx +0 -20
  32. package/dev-test/githunt/__generated__/current-user.query.stencil-component.tsx +0 -34
  33. package/dev-test/githunt/__generated__/feed-entry.fragment.stencil-component.tsx +0 -30
  34. package/dev-test/githunt/__generated__/feed.query.stencil-component.tsx +0 -40
  35. package/dev-test/githunt/__generated__/new-entry.mutation.stencil-component.tsx +0 -35
  36. package/dev-test/githunt/__generated__/repo-info.fragment.stencil-component.tsx +0 -26
  37. package/dev-test/githunt/__generated__/submit-comment.mutation.stencil-component.tsx +0 -35
  38. package/dev-test/githunt/__generated__/vote-buttons.fragment.stencil-component.tsx +0 -16
  39. package/dev-test/githunt/__generated__/vote.mutation.stencil-component.tsx +0 -41
  40. package/dev-test/githunt/comment-added.subscription.graphql +0 -11
  41. package/dev-test/githunt/comment.query.graphql +0 -33
  42. package/dev-test/githunt/comments-page-comment.fragment.graphql +0 -9
  43. package/dev-test/githunt/current-user.query.graphql +0 -6
  44. package/dev-test/githunt/feed-entry.fragment.graphql +0 -13
  45. package/dev-test/githunt/feed.query.graphql +0 -8
  46. package/dev-test/githunt/flow.flow.js +0 -367
  47. package/dev-test/githunt/graphql-declared-modules.d.ts +0 -87
  48. package/dev-test/githunt/new-entry.mutation.graphql +0 -5
  49. package/dev-test/githunt/repo-info.fragment.graphql +0 -12
  50. package/dev-test/githunt/schema.js +0 -3
  51. package/dev-test/githunt/schema.json +0 -1750
  52. package/dev-test/githunt/submit-comment.mutation.graphql +0 -5
  53. package/dev-test/githunt/typed-document-nodes.ts +0 -892
  54. package/dev-test/githunt/types.apolloAngular.sdk.ts +0 -570
  55. package/dev-test/githunt/types.apolloAngular.ts +0 -491
  56. package/dev-test/githunt/types.avoidOptionals.ts +0 -266
  57. package/dev-test/githunt/types.d.ts +0 -261
  58. package/dev-test/githunt/types.enumsAsTypes.ts +0 -261
  59. package/dev-test/githunt/types.flatten.preResolveTypes.ts +0 -289
  60. package/dev-test/githunt/types.immutableTypes.ts +0 -267
  61. package/dev-test/githunt/types.preResolveTypes.compatibility.ts +0 -368
  62. package/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts +0 -156
  63. package/dev-test/githunt/types.preResolveTypes.ts +0 -293
  64. package/dev-test/githunt/types.reactApollo.customSuffix.tsx +0 -634
  65. package/dev-test/githunt/types.reactApollo.hooks.tsx +0 -621
  66. package/dev-test/githunt/types.reactApollo.preResolveTypes.tsx +0 -648
  67. package/dev-test/githunt/types.reactApollo.tsx +0 -621
  68. package/dev-test/githunt/types.reactApollo.v2.tsx +0 -635
  69. package/dev-test/githunt/types.stencilApollo.tsx +0 -484
  70. package/dev-test/githunt/types.ts +0 -266
  71. package/dev-test/githunt/types.urql.tsx +0 -444
  72. package/dev-test/githunt/types.vueApollo.ts +0 -647
  73. package/dev-test/githunt/vote-buttons.fragment.graphql +0 -6
  74. package/dev-test/githunt/vote.mutation.graphql +0 -9
  75. package/dev-test/setup.js +0 -3
  76. package/dev-test/test-message/documents.ts +0 -46
  77. package/dev-test/test-message/schema.graphql +0 -23
  78. package/dev-test/test-message/types.tsx +0 -237
  79. package/dev-test/test-schema/env.types.ts +0 -35
  80. package/dev-test/test-schema/flow-types.flow.js +0 -139
  81. package/dev-test/test-schema/local/schema-ast.js +0 -2
  82. package/dev-test/test-schema/local/schema-formats.js +0 -20
  83. package/dev-test/test-schema/local/schema-object.js +0 -2
  84. package/dev-test/test-schema/local/schema-text.js +0 -2
  85. package/dev-test/test-schema/local/schema.graphql +0 -8
  86. package/dev-test/test-schema/resolvers-federation.ts +0 -233
  87. package/dev-test/test-schema/resolvers-root.ts +0 -178
  88. package/dev-test/test-schema/resolvers-types.ts +0 -168
  89. package/dev-test/test-schema/schema-ast.js +0 -2
  90. package/dev-test/test-schema/schema-federation.graphql +0 -30
  91. package/dev-test/test-schema/schema-formats.js +0 -38
  92. package/dev-test/test-schema/schema-json.js +0 -2
  93. package/dev-test/test-schema/schema-object.js +0 -2
  94. package/dev-test/test-schema/schema-text.js +0 -2
  95. package/dev-test/test-schema/schema-with-imports.graphql +0 -9
  96. package/dev-test/test-schema/schema-with-root.graphql +0 -22
  97. package/dev-test/test-schema/schema.graphql +0 -19
  98. package/dev-test/test-schema/schema.json +0 -1070
  99. package/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts +0 -19
  100. package/dev-test/test-schema/types.preResolveTypes.ts +0 -44
  101. package/dev-test/test-schema/typings.avoidOptionals.ts +0 -27
  102. package/dev-test/test-schema/typings.enum.ts +0 -19
  103. package/dev-test/test-schema/typings.immutableTypes.ts +0 -27
  104. package/dev-test/test-schema/typings.ts +0 -156
  105. package/dev-test/test-schema/typings.wrapped.ts +0 -29
  106. package/dev-test/tsconfig.json +0 -18
  107. package/jest.config.js +0 -30
  108. package/renovate.json +0 -2
  109. package/src/config.ts +0 -29
  110. package/src/index.ts +0 -54
  111. package/src/visitor.ts +0 -259
  112. package/tests/outputs/autogenSWRKey.ts +0 -46
  113. package/tests/outputs/excludeQueries.ts +0 -13
  114. package/tests/outputs/infinite.ts +0 -49
  115. package/tests/outputs/mutations.ts +0 -19
  116. package/tests/outputs/rawRequest.ts +0 -19
  117. package/tests/outputs/straight.ts +0 -19
  118. package/tests/swr.spec.ts +0 -306
  119. package/tests/visitor.spec.ts +0 -19
  120. package/tsconfig.json +0 -32
  121. package/tsconfig.main.json +0 -11
  122. package/tsconfig.module.json +0 -13
  123. package/yarn-error.log +0 -5477
  124. package/yarn.lock +0 -5359
@@ -1,647 +0,0 @@
1
- import gql from 'graphql-tag';
2
- import * as VueApolloComposable from '@vue/apollo-composable';
3
- import * as VueCompositionApi from '@vue/composition-api';
4
- export type Maybe<T> = T | null;
5
- export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
6
- export type ReactiveFunction<TParam> = () => TParam;
7
- /** All built-in and custom scalars, mapped to their actual values */
8
- export type Scalars = {
9
- ID: string;
10
- String: string;
11
- Boolean: boolean;
12
- Int: number;
13
- Float: number;
14
- };
15
-
16
- export type Query = {
17
- __typename?: 'Query';
18
- /** A feed of repository submissions */
19
- feed?: Maybe<Array<Maybe<Entry>>>;
20
- /** A single entry */
21
- entry?: Maybe<Entry>;
22
- /** Return the currently logged in user, or null if nobody is logged in */
23
- currentUser?: Maybe<User>;
24
- };
25
-
26
- export type QueryFeedArgs = {
27
- type: FeedType;
28
- offset?: Maybe<Scalars['Int']>;
29
- limit?: Maybe<Scalars['Int']>;
30
- };
31
-
32
- export type QueryEntryArgs = {
33
- repoFullName: Scalars['String'];
34
- };
35
-
36
- /** A list of options for the sort order of the feed */
37
- export enum FeedType {
38
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
39
- Hot = 'HOT',
40
- /** Newest entries first */
41
- New = 'NEW',
42
- /** Highest score entries first */
43
- Top = 'TOP',
44
- }
45
-
46
- /** Information about a GitHub repository submitted to GitHunt */
47
- export type Entry = {
48
- __typename?: 'Entry';
49
- /** Information about the repository from GitHub */
50
- repository: Repository;
51
- /** The GitHub user who submitted this entry */
52
- postedBy: User;
53
- /** A timestamp of when the entry was submitted */
54
- createdAt: Scalars['Float'];
55
- /** The score of this repository, upvotes - downvotes */
56
- score: Scalars['Int'];
57
- /** The hot score of this repository */
58
- hotScore: Scalars['Float'];
59
- /** Comments posted about this repository */
60
- comments: Array<Maybe<Comment>>;
61
- /** The number of comments posted about this repository */
62
- commentCount: Scalars['Int'];
63
- /** The SQL ID of this entry */
64
- id: Scalars['Int'];
65
- /** XXX to be changed */
66
- vote: Vote;
67
- };
68
-
69
- /** Information about a GitHub repository submitted to GitHunt */
70
- export type EntryCommentsArgs = {
71
- limit?: Maybe<Scalars['Int']>;
72
- offset?: Maybe<Scalars['Int']>;
73
- };
74
-
75
- /**
76
- * A repository object from the GitHub API. This uses the exact field names returned by the
77
- * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
78
- */
79
- export type Repository = {
80
- __typename?: 'Repository';
81
- /** Just the name of the repository, e.g. GitHunt-API */
82
- name: Scalars['String'];
83
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
84
- full_name: Scalars['String'];
85
- /** The description of the repository */
86
- description?: Maybe<Scalars['String']>;
87
- /** The link to the repository on GitHub */
88
- html_url: Scalars['String'];
89
- /** The number of people who have starred this repository on GitHub */
90
- stargazers_count: Scalars['Int'];
91
- /** The number of open issues on this repository on GitHub */
92
- open_issues_count?: Maybe<Scalars['Int']>;
93
- /** The owner of this repository on GitHub, e.g. apollostack */
94
- owner?: Maybe<User>;
95
- };
96
-
97
- /** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
98
- export type User = {
99
- __typename?: 'User';
100
- /** The name of the user, e.g. apollostack */
101
- login: Scalars['String'];
102
- /** The URL to a directly embeddable image for this user's avatar */
103
- avatar_url: Scalars['String'];
104
- /** The URL of this user's GitHub page */
105
- html_url: Scalars['String'];
106
- };
107
-
108
- /** A comment about an entry, submitted by a user */
109
- export type Comment = {
110
- __typename?: 'Comment';
111
- /** The SQL ID of this entry */
112
- id: Scalars['Int'];
113
- /** The GitHub user who posted the comment */
114
- postedBy: User;
115
- /** A timestamp of when the comment was posted */
116
- createdAt: Scalars['Float'];
117
- /** The text of the comment */
118
- content: Scalars['String'];
119
- /** The repository which this comment is about */
120
- repoName: Scalars['String'];
121
- };
122
-
123
- /** XXX to be removed */
124
- export type Vote = {
125
- __typename?: 'Vote';
126
- vote_value: Scalars['Int'];
127
- };
128
-
129
- export type Mutation = {
130
- __typename?: 'Mutation';
131
- /** Submit a new repository, returns the new submission */
132
- submitRepository?: Maybe<Entry>;
133
- /** Vote on a repository submission, returns the submission that was voted on */
134
- vote?: Maybe<Entry>;
135
- /** Comment on a repository, returns the new comment */
136
- submitComment?: Maybe<Comment>;
137
- };
138
-
139
- export type MutationSubmitRepositoryArgs = {
140
- repoFullName: Scalars['String'];
141
- };
142
-
143
- export type MutationVoteArgs = {
144
- repoFullName: Scalars['String'];
145
- type: VoteType;
146
- };
147
-
148
- export type MutationSubmitCommentArgs = {
149
- repoFullName: Scalars['String'];
150
- commentContent: Scalars['String'];
151
- };
152
-
153
- /** The type of vote to record, when submitting a vote */
154
- export enum VoteType {
155
- Up = 'UP',
156
- Down = 'DOWN',
157
- Cancel = 'CANCEL',
158
- }
159
-
160
- export type Subscription = {
161
- __typename?: 'Subscription';
162
- /** Subscription fires on every comment added */
163
- commentAdded?: Maybe<Comment>;
164
- };
165
-
166
- export type SubscriptionCommentAddedArgs = {
167
- repoFullName: Scalars['String'];
168
- };
169
-
170
- export type OnCommentAddedSubscriptionVariables = Exact<{
171
- repoFullName: Scalars['String'];
172
- }>;
173
-
174
- export type OnCommentAddedSubscription = { __typename?: 'Subscription' } & {
175
- commentAdded?: Maybe<
176
- { __typename?: 'Comment' } & Pick<Comment, 'id' | 'createdAt' | 'content'> & {
177
- postedBy: { __typename?: 'User' } & Pick<User, 'login' | 'html_url'>;
178
- }
179
- >;
180
- };
181
-
182
- export type CommentQueryVariables = Exact<{
183
- repoFullName: Scalars['String'];
184
- limit?: Maybe<Scalars['Int']>;
185
- offset?: Maybe<Scalars['Int']>;
186
- }>;
187
-
188
- export type CommentQuery = { __typename?: 'Query' } & {
189
- currentUser?: Maybe<{ __typename?: 'User' } & Pick<User, 'login' | 'html_url'>>;
190
- entry?: Maybe<
191
- { __typename?: 'Entry' } & Pick<Entry, 'id' | 'createdAt' | 'commentCount'> & {
192
- postedBy: { __typename?: 'User' } & Pick<User, 'login' | 'html_url'>;
193
- comments: Array<Maybe<{ __typename?: 'Comment' } & CommentsPageCommentFragment>>;
194
- repository: { __typename?: 'Repository' } & Pick<
195
- Repository,
196
- 'description' | 'open_issues_count' | 'stargazers_count' | 'full_name' | 'html_url'
197
- >;
198
- }
199
- >;
200
- };
201
-
202
- export type CommentsPageCommentFragment = { __typename?: 'Comment' } & Pick<Comment, 'id' | 'createdAt' | 'content'> & {
203
- postedBy: { __typename?: 'User' } & Pick<User, 'login' | 'html_url'>;
204
- };
205
-
206
- export type CurrentUserForProfileQueryVariables = Exact<{ [key: string]: never }>;
207
-
208
- export type CurrentUserForProfileQuery = { __typename?: 'Query' } & {
209
- currentUser?: Maybe<{ __typename?: 'User' } & Pick<User, 'login' | 'avatar_url'>>;
210
- };
211
-
212
- export type FeedEntryFragment = { __typename?: 'Entry' } & Pick<Entry, 'id' | 'commentCount'> & {
213
- repository: { __typename?: 'Repository' } & Pick<Repository, 'full_name' | 'html_url'> & {
214
- owner?: Maybe<{ __typename?: 'User' } & Pick<User, 'avatar_url'>>;
215
- };
216
- } & VoteButtonsFragment &
217
- RepoInfoFragment;
218
-
219
- export type FeedQueryVariables = Exact<{
220
- type: FeedType;
221
- offset?: Maybe<Scalars['Int']>;
222
- limit?: Maybe<Scalars['Int']>;
223
- }>;
224
-
225
- export type FeedQuery = { __typename?: 'Query' } & {
226
- currentUser?: Maybe<{ __typename?: 'User' } & Pick<User, 'login'>>;
227
- feed?: Maybe<Array<Maybe<{ __typename?: 'Entry' } & FeedEntryFragment>>>;
228
- };
229
-
230
- export type SubmitRepositoryMutationVariables = Exact<{
231
- repoFullName: Scalars['String'];
232
- }>;
233
-
234
- export type SubmitRepositoryMutation = { __typename?: 'Mutation' } & {
235
- submitRepository?: Maybe<{ __typename?: 'Entry' } & Pick<Entry, 'createdAt'>>;
236
- };
237
-
238
- export type RepoInfoFragment = { __typename?: 'Entry' } & Pick<Entry, 'createdAt'> & {
239
- repository: { __typename?: 'Repository' } & Pick<
240
- Repository,
241
- 'description' | 'stargazers_count' | 'open_issues_count'
242
- >;
243
- postedBy: { __typename?: 'User' } & Pick<User, 'html_url' | 'login'>;
244
- };
245
-
246
- export type SubmitCommentMutationVariables = Exact<{
247
- repoFullName: Scalars['String'];
248
- commentContent: Scalars['String'];
249
- }>;
250
-
251
- export type SubmitCommentMutation = { __typename?: 'Mutation' } & {
252
- submitComment?: Maybe<{ __typename?: 'Comment' } & CommentsPageCommentFragment>;
253
- };
254
-
255
- export type VoteButtonsFragment = { __typename?: 'Entry' } & Pick<Entry, 'score'> & {
256
- vote: { __typename?: 'Vote' } & Pick<Vote, 'vote_value'>;
257
- };
258
-
259
- export type VoteMutationVariables = Exact<{
260
- repoFullName: Scalars['String'];
261
- type: VoteType;
262
- }>;
263
-
264
- export type VoteMutation = { __typename?: 'Mutation' } & {
265
- vote?: Maybe<
266
- { __typename?: 'Entry' } & Pick<Entry, 'score' | 'id'> & {
267
- vote: { __typename?: 'Vote' } & Pick<Vote, 'vote_value'>;
268
- }
269
- >;
270
- };
271
-
272
- export const CommentsPageCommentFragmentDoc = gql`
273
- fragment CommentsPageComment on Comment {
274
- id
275
- postedBy {
276
- login
277
- html_url
278
- }
279
- createdAt
280
- content
281
- }
282
- `;
283
- export const VoteButtonsFragmentDoc = gql`
284
- fragment VoteButtons on Entry {
285
- score
286
- vote {
287
- vote_value
288
- }
289
- }
290
- `;
291
- export const RepoInfoFragmentDoc = gql`
292
- fragment RepoInfo on Entry {
293
- createdAt
294
- repository {
295
- description
296
- stargazers_count
297
- open_issues_count
298
- }
299
- postedBy {
300
- html_url
301
- login
302
- }
303
- }
304
- `;
305
- export const FeedEntryFragmentDoc = gql`
306
- fragment FeedEntry on Entry {
307
- id
308
- commentCount
309
- repository {
310
- full_name
311
- html_url
312
- owner {
313
- avatar_url
314
- }
315
- }
316
- ...VoteButtons
317
- ...RepoInfo
318
- }
319
- ${VoteButtonsFragmentDoc}
320
- ${RepoInfoFragmentDoc}
321
- `;
322
- export const OnCommentAddedDocument = gql`
323
- subscription onCommentAdded($repoFullName: String!) {
324
- commentAdded(repoFullName: $repoFullName) {
325
- id
326
- postedBy {
327
- login
328
- html_url
329
- }
330
- createdAt
331
- content
332
- }
333
- }
334
- `;
335
-
336
- /**
337
- * __useOnCommentAddedSubscription__
338
- *
339
- * To run a query within a Vue component, call `useOnCommentAddedSubscription` and pass it any options that fit your needs.
340
- * When your component renders, `useOnCommentAddedSubscription` returns an object from Apollo Client that contains result, loading and error properties
341
- * you can use to render your UI.
342
- *
343
- * @param options that will be passed into the subscription, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/subscription.html#options;
344
- *
345
- * @example
346
- * const { result, loading, error } = useOnCommentAddedSubscription(
347
- * {
348
- * repoFullName: // value for 'repoFullName'
349
- * }
350
- * );
351
- */
352
- export function useOnCommentAddedSubscription(
353
- variables:
354
- | OnCommentAddedSubscriptionVariables
355
- | VueCompositionApi.Ref<OnCommentAddedSubscriptionVariables>
356
- | ReactiveFunction<OnCommentAddedSubscriptionVariables>,
357
- options:
358
- | VueApolloComposable.UseSubscriptionOptions<OnCommentAddedSubscription, OnCommentAddedSubscriptionVariables>
359
- | VueCompositionApi.Ref<
360
- VueApolloComposable.UseSubscriptionOptions<OnCommentAddedSubscription, OnCommentAddedSubscriptionVariables>
361
- >
362
- | ReactiveFunction<
363
- VueApolloComposable.UseSubscriptionOptions<OnCommentAddedSubscription, OnCommentAddedSubscriptionVariables>
364
- > = {}
365
- ) {
366
- return VueApolloComposable.useSubscription<OnCommentAddedSubscription, OnCommentAddedSubscriptionVariables>(
367
- OnCommentAddedDocument,
368
- variables,
369
- options
370
- );
371
- }
372
- export type OnCommentAddedSubscriptionCompositionFunctionResult = VueApolloComposable.UseSubscriptionReturn<
373
- OnCommentAddedSubscription,
374
- OnCommentAddedSubscriptionVariables
375
- >;
376
- export const CommentDocument = gql`
377
- query Comment($repoFullName: String!, $limit: Int, $offset: Int) {
378
- currentUser {
379
- login
380
- html_url
381
- }
382
- entry(repoFullName: $repoFullName) {
383
- id
384
- postedBy {
385
- login
386
- html_url
387
- }
388
- createdAt
389
- comments(limit: $limit, offset: $offset) {
390
- ...CommentsPageComment
391
- }
392
- commentCount
393
- repository {
394
- full_name
395
- html_url
396
- ... on Repository {
397
- description
398
- open_issues_count
399
- stargazers_count
400
- }
401
- }
402
- }
403
- }
404
- ${CommentsPageCommentFragmentDoc}
405
- `;
406
-
407
- /**
408
- * __useCommentQuery__
409
- *
410
- * To run a query within a Vue component, call `useCommentQuery` and pass it any options that fit your needs.
411
- * When your component renders, `useCommentQuery` returns an object from Apollo Client that contains result, loading and error properties
412
- * you can use to render your UI.
413
- *
414
- * @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options;
415
- *
416
- * @example
417
- * const { result, loading, error } = useCommentQuery(
418
- * {
419
- * repoFullName: // value for 'repoFullName'
420
- * limit: // value for 'limit'
421
- * offset: // value for 'offset'
422
- * }
423
- * );
424
- */
425
- export function useCommentQuery(
426
- variables:
427
- | CommentQueryVariables
428
- | VueCompositionApi.Ref<CommentQueryVariables>
429
- | ReactiveFunction<CommentQueryVariables>,
430
- options:
431
- | VueApolloComposable.UseQueryOptions<CommentQuery, CommentQueryVariables>
432
- | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<CommentQuery, CommentQueryVariables>>
433
- | ReactiveFunction<VueApolloComposable.UseQueryOptions<CommentQuery, CommentQueryVariables>> = {}
434
- ) {
435
- return VueApolloComposable.useQuery<CommentQuery, CommentQueryVariables>(CommentDocument, variables, options);
436
- }
437
- export type CommentQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<
438
- CommentQuery,
439
- CommentQueryVariables
440
- >;
441
- export const CurrentUserForProfileDocument = gql`
442
- query CurrentUserForProfile {
443
- currentUser {
444
- login
445
- avatar_url
446
- }
447
- }
448
- `;
449
-
450
- /**
451
- * __useCurrentUserForProfileQuery__
452
- *
453
- * To run a query within a Vue component, call `useCurrentUserForProfileQuery` and pass it any options that fit your needs.
454
- * When your component renders, `useCurrentUserForProfileQuery` returns an object from Apollo Client that contains result, loading and error properties
455
- * you can use to render your UI.
456
- *
457
- * @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options;
458
- *
459
- * @example
460
- * const { result, loading, error } = useCurrentUserForProfileQuery(
461
- * {
462
- * }
463
- * );
464
- */
465
- export function useCurrentUserForProfileQuery(
466
- options:
467
- | VueApolloComposable.UseQueryOptions<CurrentUserForProfileQuery, CurrentUserForProfileQueryVariables>
468
- | VueCompositionApi.Ref<
469
- VueApolloComposable.UseQueryOptions<CurrentUserForProfileQuery, CurrentUserForProfileQueryVariables>
470
- >
471
- | ReactiveFunction<
472
- VueApolloComposable.UseQueryOptions<CurrentUserForProfileQuery, CurrentUserForProfileQueryVariables>
473
- > = {}
474
- ) {
475
- return VueApolloComposable.useQuery<CurrentUserForProfileQuery, undefined>(
476
- CurrentUserForProfileDocument,
477
- undefined,
478
- options
479
- );
480
- }
481
- export type CurrentUserForProfileQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<
482
- CurrentUserForProfileQuery,
483
- CurrentUserForProfileQueryVariables
484
- >;
485
- export const FeedDocument = gql`
486
- query Feed($type: FeedType!, $offset: Int, $limit: Int) {
487
- currentUser {
488
- login
489
- }
490
- feed(type: $type, offset: $offset, limit: $limit) {
491
- ...FeedEntry
492
- }
493
- }
494
- ${FeedEntryFragmentDoc}
495
- `;
496
-
497
- /**
498
- * __useFeedQuery__
499
- *
500
- * To run a query within a Vue component, call `useFeedQuery` and pass it any options that fit your needs.
501
- * When your component renders, `useFeedQuery` returns an object from Apollo Client that contains result, loading and error properties
502
- * you can use to render your UI.
503
- *
504
- * @param options that will be passed into the query, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/query.html#options;
505
- *
506
- * @example
507
- * const { result, loading, error } = useFeedQuery(
508
- * {
509
- * type: // value for 'type'
510
- * offset: // value for 'offset'
511
- * limit: // value for 'limit'
512
- * }
513
- * );
514
- */
515
- export function useFeedQuery(
516
- variables: FeedQueryVariables | VueCompositionApi.Ref<FeedQueryVariables> | ReactiveFunction<FeedQueryVariables>,
517
- options:
518
- | VueApolloComposable.UseQueryOptions<FeedQuery, FeedQueryVariables>
519
- | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<FeedQuery, FeedQueryVariables>>
520
- | ReactiveFunction<VueApolloComposable.UseQueryOptions<FeedQuery, FeedQueryVariables>> = {}
521
- ) {
522
- return VueApolloComposable.useQuery<FeedQuery, FeedQueryVariables>(FeedDocument, variables, options);
523
- }
524
- export type FeedQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<FeedQuery, FeedQueryVariables>;
525
- export const SubmitRepositoryDocument = gql`
526
- mutation submitRepository($repoFullName: String!) {
527
- submitRepository(repoFullName: $repoFullName) {
528
- createdAt
529
- }
530
- }
531
- `;
532
-
533
- /**
534
- * __useSubmitRepositoryMutation__
535
- *
536
- * To run a mutation, you first call `useSubmitRepositoryMutation` within a Vue component and pass it any options that fit your needs.
537
- * When your component renders, `useSubmitRepositoryMutation` returns an object that includes:
538
- * - A mutate function that you can call at any time to execute the mutation
539
- * - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return
540
- *
541
- * @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options;
542
- *
543
- * @example
544
- * const { mutate, loading, error, onDone } = useSubmitRepositoryMutation({
545
- * variables: {
546
- * repoFullName: // value for 'repoFullName'
547
- * },
548
- * });
549
- */
550
- export function useSubmitRepositoryMutation(
551
- options:
552
- | VueApolloComposable.UseMutationOptions<SubmitRepositoryMutation, SubmitRepositoryMutationVariables>
553
- | ReactiveFunction<
554
- VueApolloComposable.UseMutationOptions<SubmitRepositoryMutation, SubmitRepositoryMutationVariables>
555
- >
556
- ) {
557
- return VueApolloComposable.useMutation<SubmitRepositoryMutation, SubmitRepositoryMutationVariables>(
558
- SubmitRepositoryDocument,
559
- options
560
- );
561
- }
562
- export type SubmitRepositoryMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<
563
- SubmitRepositoryMutation,
564
- SubmitRepositoryMutationVariables
565
- >;
566
- export const SubmitCommentDocument = gql`
567
- mutation submitComment($repoFullName: String!, $commentContent: String!) {
568
- submitComment(repoFullName: $repoFullName, commentContent: $commentContent) {
569
- ...CommentsPageComment
570
- }
571
- }
572
- ${CommentsPageCommentFragmentDoc}
573
- `;
574
-
575
- /**
576
- * __useSubmitCommentMutation__
577
- *
578
- * To run a mutation, you first call `useSubmitCommentMutation` within a Vue component and pass it any options that fit your needs.
579
- * When your component renders, `useSubmitCommentMutation` returns an object that includes:
580
- * - A mutate function that you can call at any time to execute the mutation
581
- * - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return
582
- *
583
- * @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options;
584
- *
585
- * @example
586
- * const { mutate, loading, error, onDone } = useSubmitCommentMutation({
587
- * variables: {
588
- * repoFullName: // value for 'repoFullName'
589
- * commentContent: // value for 'commentContent'
590
- * },
591
- * });
592
- */
593
- export function useSubmitCommentMutation(
594
- options:
595
- | VueApolloComposable.UseMutationOptions<SubmitCommentMutation, SubmitCommentMutationVariables>
596
- | ReactiveFunction<VueApolloComposable.UseMutationOptions<SubmitCommentMutation, SubmitCommentMutationVariables>>
597
- ) {
598
- return VueApolloComposable.useMutation<SubmitCommentMutation, SubmitCommentMutationVariables>(
599
- SubmitCommentDocument,
600
- options
601
- );
602
- }
603
- export type SubmitCommentMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<
604
- SubmitCommentMutation,
605
- SubmitCommentMutationVariables
606
- >;
607
- export const VoteDocument = gql`
608
- mutation vote($repoFullName: String!, $type: VoteType!) {
609
- vote(repoFullName: $repoFullName, type: $type) {
610
- score
611
- id
612
- vote {
613
- vote_value
614
- }
615
- }
616
- }
617
- `;
618
-
619
- /**
620
- * __useVoteMutation__
621
- *
622
- * To run a mutation, you first call `useVoteMutation` within a Vue component and pass it any options that fit your needs.
623
- * When your component renders, `useVoteMutation` returns an object that includes:
624
- * - A mutate function that you can call at any time to execute the mutation
625
- * - Several other properties: https://v4.apollo.vuejs.org/api/use-mutation.html#return
626
- *
627
- * @param options that will be passed into the mutation, supported options are listed on: https://v4.apollo.vuejs.org/guide-composable/mutation.html#options;
628
- *
629
- * @example
630
- * const { mutate, loading, error, onDone } = useVoteMutation({
631
- * variables: {
632
- * repoFullName: // value for 'repoFullName'
633
- * type: // value for 'type'
634
- * },
635
- * });
636
- */
637
- export function useVoteMutation(
638
- options:
639
- | VueApolloComposable.UseMutationOptions<VoteMutation, VoteMutationVariables>
640
- | ReactiveFunction<VueApolloComposable.UseMutationOptions<VoteMutation, VoteMutationVariables>>
641
- ) {
642
- return VueApolloComposable.useMutation<VoteMutation, VoteMutationVariables>(VoteDocument, options);
643
- }
644
- export type VoteMutationCompositionFunctionResult = VueApolloComposable.UseMutationReturn<
645
- VoteMutation,
646
- VoteMutationVariables
647
- >;
@@ -1,6 +0,0 @@
1
- fragment VoteButtons on Entry {
2
- score
3
- vote {
4
- vote_value
5
- }
6
- }
@@ -1,9 +0,0 @@
1
- mutation vote($repoFullName: String!, $type: VoteType!) {
2
- vote(repoFullName: $repoFullName, type: $type) {
3
- score
4
- id
5
- vote {
6
- vote_value
7
- }
8
- }
9
- }
package/dev-test/setup.js DELETED
@@ -1,3 +0,0 @@
1
- process.on('unhandledRejection', (err) => {
2
- fail(err);
3
- });