graphql-codegen-plugin-typescript-swr 0.8.5 → 0.9.0

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 (115) hide show
  1. package/README.md +5 -0
  2. package/build/main/visitor.js +2 -2
  3. package/build/module/visitor.js +2 -2
  4. package/package.json +8 -5
  5. package/.editorconfig +0 -13
  6. package/.eslintrc.js +0 -63
  7. package/.github/CONTRIBUTING.md +0 -3
  8. package/.github/ISSUE_TEMPLATE.md +0 -9
  9. package/.github/PULL_REQUEST_TEMPLATE.md +0 -7
  10. package/.github/workflows/main.yml +0 -28
  11. package/.gitignore +0 -8
  12. package/.prettierignore +0 -3
  13. package/.prettierrc.json +0 -4
  14. package/.vscode/extensions.json +0 -8
  15. package/.vscode/launch.json +0 -29
  16. package/.vscode/settings.json +0 -41
  17. package/build/tsconfig.main.tsbuildinfo +0 -1
  18. package/build/tsconfig.module.tsbuildinfo +0 -1
  19. package/dev-test/.env +0 -1
  20. package/dev-test/codegen.yml +0 -357
  21. package/dev-test/githunt/__generated__/comment-added.subscription.stencil-component.tsx +0 -47
  22. package/dev-test/githunt/__generated__/comment.query.stencil-component.tsx +0 -68
  23. package/dev-test/githunt/__generated__/comments-page-comment.fragment.stencil-component.tsx +0 -20
  24. package/dev-test/githunt/__generated__/current-user.query.stencil-component.tsx +0 -34
  25. package/dev-test/githunt/__generated__/feed-entry.fragment.stencil-component.tsx +0 -30
  26. package/dev-test/githunt/__generated__/feed.query.stencil-component.tsx +0 -40
  27. package/dev-test/githunt/__generated__/new-entry.mutation.stencil-component.tsx +0 -35
  28. package/dev-test/githunt/__generated__/repo-info.fragment.stencil-component.tsx +0 -26
  29. package/dev-test/githunt/__generated__/submit-comment.mutation.stencil-component.tsx +0 -35
  30. package/dev-test/githunt/__generated__/vote-buttons.fragment.stencil-component.tsx +0 -16
  31. package/dev-test/githunt/__generated__/vote.mutation.stencil-component.tsx +0 -41
  32. package/dev-test/githunt/comment-added.subscription.graphql +0 -11
  33. package/dev-test/githunt/comment.query.graphql +0 -33
  34. package/dev-test/githunt/comments-page-comment.fragment.graphql +0 -9
  35. package/dev-test/githunt/current-user.query.graphql +0 -6
  36. package/dev-test/githunt/feed-entry.fragment.graphql +0 -13
  37. package/dev-test/githunt/feed.query.graphql +0 -8
  38. package/dev-test/githunt/flow.flow.js +0 -367
  39. package/dev-test/githunt/graphql-declared-modules.d.ts +0 -87
  40. package/dev-test/githunt/new-entry.mutation.graphql +0 -5
  41. package/dev-test/githunt/repo-info.fragment.graphql +0 -12
  42. package/dev-test/githunt/schema.js +0 -3
  43. package/dev-test/githunt/schema.json +0 -1750
  44. package/dev-test/githunt/submit-comment.mutation.graphql +0 -5
  45. package/dev-test/githunt/typed-document-nodes.ts +0 -892
  46. package/dev-test/githunt/types.apolloAngular.sdk.ts +0 -570
  47. package/dev-test/githunt/types.apolloAngular.ts +0 -491
  48. package/dev-test/githunt/types.avoidOptionals.ts +0 -266
  49. package/dev-test/githunt/types.d.ts +0 -261
  50. package/dev-test/githunt/types.enumsAsTypes.ts +0 -261
  51. package/dev-test/githunt/types.flatten.preResolveTypes.ts +0 -289
  52. package/dev-test/githunt/types.immutableTypes.ts +0 -267
  53. package/dev-test/githunt/types.preResolveTypes.compatibility.ts +0 -368
  54. package/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts +0 -156
  55. package/dev-test/githunt/types.preResolveTypes.ts +0 -293
  56. package/dev-test/githunt/types.reactApollo.customSuffix.tsx +0 -634
  57. package/dev-test/githunt/types.reactApollo.hooks.tsx +0 -621
  58. package/dev-test/githunt/types.reactApollo.preResolveTypes.tsx +0 -648
  59. package/dev-test/githunt/types.reactApollo.tsx +0 -621
  60. package/dev-test/githunt/types.reactApollo.v2.tsx +0 -635
  61. package/dev-test/githunt/types.stencilApollo.tsx +0 -484
  62. package/dev-test/githunt/types.ts +0 -266
  63. package/dev-test/githunt/types.urql.tsx +0 -444
  64. package/dev-test/githunt/types.vueApollo.ts +0 -647
  65. package/dev-test/githunt/vote-buttons.fragment.graphql +0 -6
  66. package/dev-test/githunt/vote.mutation.graphql +0 -9
  67. package/dev-test/setup.js +0 -3
  68. package/dev-test/test-message/documents.ts +0 -46
  69. package/dev-test/test-message/schema.graphql +0 -23
  70. package/dev-test/test-message/types.tsx +0 -237
  71. package/dev-test/test-schema/env.types.ts +0 -35
  72. package/dev-test/test-schema/flow-types.flow.js +0 -139
  73. package/dev-test/test-schema/local/schema-ast.js +0 -2
  74. package/dev-test/test-schema/local/schema-formats.js +0 -20
  75. package/dev-test/test-schema/local/schema-object.js +0 -2
  76. package/dev-test/test-schema/local/schema-text.js +0 -2
  77. package/dev-test/test-schema/local/schema.graphql +0 -8
  78. package/dev-test/test-schema/resolvers-federation.ts +0 -233
  79. package/dev-test/test-schema/resolvers-root.ts +0 -178
  80. package/dev-test/test-schema/resolvers-types.ts +0 -168
  81. package/dev-test/test-schema/schema-ast.js +0 -2
  82. package/dev-test/test-schema/schema-federation.graphql +0 -30
  83. package/dev-test/test-schema/schema-formats.js +0 -38
  84. package/dev-test/test-schema/schema-json.js +0 -2
  85. package/dev-test/test-schema/schema-object.js +0 -2
  86. package/dev-test/test-schema/schema-text.js +0 -2
  87. package/dev-test/test-schema/schema-with-imports.graphql +0 -9
  88. package/dev-test/test-schema/schema-with-root.graphql +0 -22
  89. package/dev-test/test-schema/schema.graphql +0 -19
  90. package/dev-test/test-schema/schema.json +0 -1070
  91. package/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts +0 -19
  92. package/dev-test/test-schema/types.preResolveTypes.ts +0 -44
  93. package/dev-test/test-schema/typings.avoidOptionals.ts +0 -27
  94. package/dev-test/test-schema/typings.enum.ts +0 -19
  95. package/dev-test/test-schema/typings.immutableTypes.ts +0 -27
  96. package/dev-test/test-schema/typings.ts +0 -156
  97. package/dev-test/test-schema/typings.wrapped.ts +0 -29
  98. package/dev-test/tsconfig.json +0 -18
  99. package/jest.config.js +0 -30
  100. package/renovate.json +0 -2
  101. package/src/config.ts +0 -29
  102. package/src/index.ts +0 -54
  103. package/src/visitor.ts +0 -259
  104. package/tests/outputs/autogenSWRKey.ts +0 -46
  105. package/tests/outputs/excludeQueries.ts +0 -13
  106. package/tests/outputs/infinite.ts +0 -49
  107. package/tests/outputs/mutations.ts +0 -19
  108. package/tests/outputs/rawRequest.ts +0 -19
  109. package/tests/outputs/straight.ts +0 -19
  110. package/tests/swr.spec.ts +0 -306
  111. package/tests/visitor.spec.ts +0 -19
  112. package/tsconfig.json +0 -32
  113. package/tsconfig.main.json +0 -11
  114. package/tsconfig.module.json +0 -13
  115. package/yarn.lock +0 -5359
@@ -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
- }
@@ -1,16 +0,0 @@
1
- import gql from 'graphql-tag';
2
-
3
- declare global {
4
- export type VoteButtonsFragment = { __typename?: 'Entry' } & Pick<Types.Entry, 'score'> & {
5
- vote: { __typename?: 'Vote' } & Pick<Types.Vote, 'vote_value'>;
6
- };
7
- }
8
-
9
- export const VoteButtonsFragmentDoc = gql`
10
- fragment VoteButtons on Entry {
11
- score
12
- vote {
13
- vote_value
14
- }
15
- }
16
- `;
@@ -1,41 +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 VoteMutationVariables = Types.Exact<{
7
- repoFullName: Types.Scalars['String'];
8
- type: Types.VoteType;
9
- }>;
10
-
11
- export type VoteMutation = { __typename?: 'Mutation' } & {
12
- vote?: Types.Maybe<
13
- { __typename?: 'Entry' } & Pick<Types.Entry, 'score' | 'id'> & {
14
- vote: { __typename?: 'Vote' } & Pick<Types.Vote, 'vote_value'>;
15
- }
16
- >;
17
- };
18
- }
19
-
20
- const VoteDocument = gql`
21
- mutation vote($repoFullName: String!, $type: VoteType!) {
22
- vote(repoFullName: $repoFullName, type: $type) {
23
- score
24
- id
25
- vote {
26
- vote_value
27
- }
28
- }
29
- }
30
- `;
31
-
32
- @Component({
33
- tag: 'apollo-vote',
34
- })
35
- export class VoteComponent {
36
- @Prop() renderer: import('stencil-apollo').MutationRenderer<VoteMutation, VoteMutationVariables>;
37
- @Prop() variables: VoteMutationVariables;
38
- render() {
39
- return <apollo-mutation mutation={VoteDocument} variables={this.variables} renderer={this.renderer} />;
40
- }
41
- }
@@ -1,11 +0,0 @@
1
- subscription onCommentAdded($repoFullName: String!) {
2
- commentAdded(repoFullName: $repoFullName) {
3
- id
4
- postedBy {
5
- login
6
- html_url
7
- }
8
- createdAt
9
- content
10
- }
11
- }
@@ -1,33 +0,0 @@
1
- # import './comments-page-comment.fragment.graphql'
2
-
3
- query Comment($repoFullName: String!, $limit: Int, $offset: Int) {
4
- # Eventually move this into a no fetch query right on the entry
5
- # since we literally just need this info to determine whether to
6
- # show upvote/downvote buttons
7
- currentUser {
8
- login
9
- html_url
10
- }
11
- entry(repoFullName: $repoFullName) {
12
- id
13
- postedBy {
14
- login
15
- html_url
16
- }
17
- createdAt
18
- comments(limit: $limit, offset: $offset) {
19
- ...CommentsPageComment
20
- }
21
- commentCount
22
- repository {
23
- full_name
24
- html_url
25
-
26
- ... on Repository {
27
- description
28
- open_issues_count
29
- stargazers_count
30
- }
31
- }
32
- }
33
- }
@@ -1,9 +0,0 @@
1
- fragment CommentsPageComment on Comment {
2
- id
3
- postedBy {
4
- login
5
- html_url
6
- }
7
- createdAt
8
- content
9
- }
@@ -1,6 +0,0 @@
1
- query CurrentUserForProfile {
2
- currentUser {
3
- login
4
- avatar_url
5
- }
6
- }
@@ -1,13 +0,0 @@
1
- fragment FeedEntry on Entry {
2
- id
3
- commentCount
4
- repository {
5
- full_name
6
- html_url
7
- owner {
8
- avatar_url
9
- }
10
- }
11
- ...VoteButtons
12
- ...RepoInfo
13
- }
@@ -1,8 +0,0 @@
1
- query Feed($type: FeedType!, $offset: Int, $limit: Int) {
2
- currentUser {
3
- login
4
- }
5
- feed(type: $type, offset: $offset, limit: $limit) {
6
- ...FeedEntry
7
- }
8
- }
@@ -1,367 +0,0 @@
1
- // @flow
2
-
3
- // @flow
4
-
5
- /** All built-in and custom scalars, mapped to their actual values */
6
- export type Scalars = {|
7
- ID: string,
8
- String: string,
9
- Boolean: boolean,
10
- Int: number,
11
- Float: number,
12
- |};
13
-
14
- export type Query = {|
15
- __typename?: 'Query',
16
- /** A feed of repository submissions */
17
- feed?: ?Array<?Entry>,
18
- /** A single entry */
19
- entry?: ?Entry,
20
- /** Return the currently logged in user, or null if nobody is logged in */
21
- currentUser?: ?User,
22
- |};
23
-
24
- export type QueryFeedArgs = {|
25
- type: FeedType,
26
- offset?: ?$ElementType<Scalars, 'Int'>,
27
- limit?: ?$ElementType<Scalars, 'Int'>,
28
- |};
29
-
30
- export type QueryEntryArgs = {|
31
- repoFullName: $ElementType<Scalars, 'String'>,
32
- |};
33
-
34
- export const FeedTypeValues = Object.freeze({
35
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
36
- Hot: 'HOT',
37
- /** Newest entries first */
38
- New: 'NEW',
39
- /** Highest score entries first */
40
- Top: 'TOP',
41
- });
42
-
43
- /** A list of options for the sort order of the feed */
44
- export type FeedType = $Values<typeof FeedTypeValues>;
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: $ElementType<Scalars, 'Float'>,
55
- /** The score of this repository, upvotes - downvotes */
56
- score: $ElementType<Scalars, 'Int'>,
57
- /** The hot score of this repository */
58
- hotScore: $ElementType<Scalars, 'Float'>,
59
- /** Comments posted about this repository */
60
- comments: Array<?Comment>,
61
- /** The number of comments posted about this repository */
62
- commentCount: $ElementType<Scalars, 'Int'>,
63
- /** The SQL ID of this entry */
64
- id: $ElementType<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?: ?$ElementType<Scalars, 'Int'>,
72
- offset?: ?$ElementType<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: $ElementType<Scalars, 'String'>,
83
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
84
- full_name: $ElementType<Scalars, 'String'>,
85
- /** The description of the repository */
86
- description?: ?$ElementType<Scalars, 'String'>,
87
- /** The link to the repository on GitHub */
88
- html_url: $ElementType<Scalars, 'String'>,
89
- /** The number of people who have starred this repository on GitHub */
90
- stargazers_count: $ElementType<Scalars, 'Int'>,
91
- /** The number of open issues on this repository on GitHub */
92
- open_issues_count?: ?$ElementType<Scalars, 'Int'>,
93
- /** The owner of this repository on GitHub, e.g. apollostack */
94
- owner?: ?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: $ElementType<Scalars, 'String'>,
102
- /** The URL to a directly embeddable image for this user's avatar */
103
- avatar_url: $ElementType<Scalars, 'String'>,
104
- /** The URL of this user's GitHub page */
105
- html_url: $ElementType<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: $ElementType<Scalars, 'Int'>,
113
- /** The GitHub user who posted the comment */
114
- postedBy: User,
115
- /** A timestamp of when the comment was posted */
116
- createdAt: $ElementType<Scalars, 'Float'>,
117
- /** The text of the comment */
118
- content: $ElementType<Scalars, 'String'>,
119
- /** The repository which this comment is about */
120
- repoName: $ElementType<Scalars, 'String'>,
121
- |};
122
-
123
- /** XXX to be removed */
124
- export type Vote = {|
125
- __typename?: 'Vote',
126
- vote_value: $ElementType<Scalars, 'Int'>,
127
- |};
128
-
129
- export type Mutation = {|
130
- __typename?: 'Mutation',
131
- /** Submit a new repository, returns the new submission */
132
- submitRepository?: ?Entry,
133
- /** Vote on a repository submission, returns the submission that was voted on */
134
- vote?: ?Entry,
135
- /** Comment on a repository, returns the new comment */
136
- submitComment?: ?Comment,
137
- |};
138
-
139
- export type MutationSubmitRepositoryArgs = {|
140
- repoFullName: $ElementType<Scalars, 'String'>,
141
- |};
142
-
143
- export type MutationVoteArgs = {|
144
- repoFullName: $ElementType<Scalars, 'String'>,
145
- type: VoteType,
146
- |};
147
-
148
- export type MutationSubmitCommentArgs = {|
149
- repoFullName: $ElementType<Scalars, 'String'>,
150
- commentContent: $ElementType<Scalars, 'String'>,
151
- |};
152
-
153
- export const VoteTypeValues = Object.freeze({
154
- Up: 'UP',
155
- Down: 'DOWN',
156
- Cancel: 'CANCEL',
157
- });
158
-
159
- /** The type of vote to record, when submitting a vote */
160
- export type VoteType = $Values<typeof VoteTypeValues>;
161
-
162
- export type Subscription = {|
163
- __typename?: 'Subscription',
164
- /** Subscription fires on every comment added */
165
- commentAdded?: ?Comment,
166
- |};
167
-
168
- export type SubscriptionCommentAddedArgs = {|
169
- repoFullName: $ElementType<Scalars, 'String'>,
170
- |};
171
-
172
- type $Pick<Origin: Object, Keys: Object> = $ObjMapi<Keys, <Key>(k: Key) => $ElementType<Origin, Key>>;
173
-
174
- export type OnCommentAddedSubscriptionVariables = {
175
- repoFullName: $ElementType<Scalars, 'String'>,
176
- };
177
-
178
- export type OnCommentAddedSubscription = {
179
- ...{ __typename?: 'Subscription' },
180
- ...{|
181
- commentAdded?: ?{
182
- ...{ __typename?: 'Comment' },
183
- ...$Pick<Comment, {| id: *, createdAt: *, content: * |}>,
184
- ...{|
185
- postedBy: {
186
- ...{ __typename?: 'User' },
187
- ...$Pick<User, {| login: *, html_url: * |}>,
188
- },
189
- |},
190
- },
191
- |},
192
- };
193
-
194
- export type CommentQueryVariables = {
195
- repoFullName: $ElementType<Scalars, 'String'>,
196
- limit?: ?$ElementType<Scalars, 'Int'>,
197
- offset?: ?$ElementType<Scalars, 'Int'>,
198
- };
199
-
200
- export type CommentQuery = {
201
- ...{ __typename?: 'Query' },
202
- ...{|
203
- currentUser?: ?{
204
- ...{ __typename?: 'User' },
205
- ...$Pick<User, {| login: *, html_url: * |}>,
206
- },
207
- entry?: ?{
208
- ...{ __typename?: 'Entry' },
209
- ...$Pick<Entry, {| id: *, createdAt: *, commentCount: * |}>,
210
- ...{|
211
- postedBy: {
212
- ...{ __typename?: 'User' },
213
- ...$Pick<User, {| login: *, html_url: * |}>,
214
- },
215
- comments: Array<?{
216
- ...{ __typename?: 'Comment' },
217
- ...CommentsPageCommentFragment,
218
- }>,
219
- repository: {
220
- ...{ __typename?: 'Repository' },
221
- ...$Pick<
222
- Repository,
223
- {| description?: *, open_issues_count?: *, stargazers_count: *, full_name: *, html_url: * |}
224
- >,
225
- },
226
- |},
227
- },
228
- |},
229
- };
230
-
231
- export type CommentsPageCommentFragment = {
232
- ...{ __typename?: 'Comment' },
233
- ...$Pick<Comment, {| id: *, createdAt: *, content: * |}>,
234
- ...{|
235
- postedBy: {
236
- ...{ __typename?: 'User' },
237
- ...$Pick<User, {| login: *, html_url: * |}>,
238
- },
239
- |},
240
- };
241
-
242
- export type CurrentUserForProfileQueryVariables = {};
243
-
244
- export type CurrentUserForProfileQuery = {
245
- ...{ __typename?: 'Query' },
246
- ...{|
247
- currentUser?: ?{
248
- ...{ __typename?: 'User' },
249
- ...$Pick<User, {| login: *, avatar_url: * |}>,
250
- },
251
- |},
252
- };
253
-
254
- export type FeedEntryFragment = {
255
- ...{ __typename?: 'Entry' },
256
- ...$Pick<Entry, {| id: *, commentCount: * |}>,
257
- ...{|
258
- repository: {
259
- ...{ __typename?: 'Repository' },
260
- ...$Pick<Repository, {| full_name: *, html_url: * |}>,
261
- ...{|
262
- owner?: ?{
263
- ...{ __typename?: 'User' },
264
- ...$Pick<User, {| avatar_url: * |}>,
265
- },
266
- |},
267
- },
268
- |},
269
- ...VoteButtonsFragment,
270
- ...RepoInfoFragment,
271
- };
272
-
273
- export type FeedQueryVariables = {
274
- type: FeedType,
275
- offset?: ?$ElementType<Scalars, 'Int'>,
276
- limit?: ?$ElementType<Scalars, 'Int'>,
277
- };
278
-
279
- export type FeedQuery = {
280
- ...{ __typename?: 'Query' },
281
- ...{|
282
- currentUser?: ?{
283
- ...{ __typename?: 'User' },
284
- ...$Pick<User, {| login: * |}>,
285
- },
286
- feed?: ?Array<?{
287
- ...{ __typename?: 'Entry' },
288
- ...FeedEntryFragment,
289
- }>,
290
- |},
291
- };
292
-
293
- export type SubmitRepositoryMutationVariables = {
294
- repoFullName: $ElementType<Scalars, 'String'>,
295
- };
296
-
297
- export type SubmitRepositoryMutation = {
298
- ...{ __typename?: 'Mutation' },
299
- ...{|
300
- submitRepository?: ?{
301
- ...{ __typename?: 'Entry' },
302
- ...$Pick<Entry, {| createdAt: * |}>,
303
- },
304
- |},
305
- };
306
-
307
- export type RepoInfoFragment = {
308
- ...{ __typename?: 'Entry' },
309
- ...$Pick<Entry, {| createdAt: * |}>,
310
- ...{|
311
- repository: {
312
- ...{ __typename?: 'Repository' },
313
- ...$Pick<Repository, {| description?: *, stargazers_count: *, open_issues_count?: * |}>,
314
- },
315
- postedBy: {
316
- ...{ __typename?: 'User' },
317
- ...$Pick<User, {| html_url: *, login: * |}>,
318
- },
319
- |},
320
- };
321
-
322
- export type SubmitCommentMutationVariables = {
323
- repoFullName: $ElementType<Scalars, 'String'>,
324
- commentContent: $ElementType<Scalars, 'String'>,
325
- };
326
-
327
- export type SubmitCommentMutation = {
328
- ...{ __typename?: 'Mutation' },
329
- ...{|
330
- submitComment?: ?{
331
- ...{ __typename?: 'Comment' },
332
- ...CommentsPageCommentFragment,
333
- },
334
- |},
335
- };
336
-
337
- export type VoteButtonsFragment = {
338
- ...{ __typename?: 'Entry' },
339
- ...$Pick<Entry, {| score: * |}>,
340
- ...{|
341
- vote: {
342
- ...{ __typename?: 'Vote' },
343
- ...$Pick<Vote, {| vote_value: * |}>,
344
- },
345
- |},
346
- };
347
-
348
- export type VoteMutationVariables = {
349
- repoFullName: $ElementType<Scalars, 'String'>,
350
- type: VoteType,
351
- };
352
-
353
- export type VoteMutation = {
354
- ...{ __typename?: 'Mutation' },
355
- ...{|
356
- vote?: ?{
357
- ...{ __typename?: 'Entry' },
358
- ...$Pick<Entry, {| score: *, id: * |}>,
359
- ...{|
360
- vote: {
361
- ...{ __typename?: 'Vote' },
362
- ...$Pick<Vote, {| vote_value: * |}>,
363
- },
364
- |},
365
- },
366
- |},
367
- };