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.
- package/README.md +5 -0
- package/build/main/visitor.js +2 -2
- package/build/module/visitor.js +2 -2
- package/package.json +8 -5
- 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/build/tsconfig.main.tsbuildinfo +0 -1
- package/build/tsconfig.module.tsbuildinfo +0 -1
- 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.lock +0 -5359
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
export type Maybe<T> = T | null;
|
|
2
|
-
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
|
3
|
-
/** All built-in and custom scalars, mapped to their actual values */
|
|
4
|
-
export type Scalars = {
|
|
5
|
-
ID: string;
|
|
6
|
-
String: string;
|
|
7
|
-
Boolean: boolean;
|
|
8
|
-
Int: number;
|
|
9
|
-
Float: number;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type Query = {
|
|
13
|
-
readonly __typename?: 'Query';
|
|
14
|
-
/** A feed of repository submissions */
|
|
15
|
-
readonly feed?: Maybe<ReadonlyArray<Maybe<Entry>>>;
|
|
16
|
-
/** A single entry */
|
|
17
|
-
readonly entry?: Maybe<Entry>;
|
|
18
|
-
/** Return the currently logged in user, or null if nobody is logged in */
|
|
19
|
-
readonly currentUser?: Maybe<User>;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type QueryFeedArgs = {
|
|
23
|
-
type: FeedType;
|
|
24
|
-
offset?: Maybe<Scalars['Int']>;
|
|
25
|
-
limit?: Maybe<Scalars['Int']>;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type QueryEntryArgs = {
|
|
29
|
-
repoFullName: Scalars['String'];
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/** A list of options for the sort order of the feed */
|
|
33
|
-
export enum FeedType {
|
|
34
|
-
/** Sort by a combination of freshness and score, using Reddit's algorithm */
|
|
35
|
-
Hot = 'HOT',
|
|
36
|
-
/** Newest entries first */
|
|
37
|
-
New = 'NEW',
|
|
38
|
-
/** Highest score entries first */
|
|
39
|
-
Top = 'TOP',
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** Information about a GitHub repository submitted to GitHunt */
|
|
43
|
-
export type Entry = {
|
|
44
|
-
readonly __typename?: 'Entry';
|
|
45
|
-
/** Information about the repository from GitHub */
|
|
46
|
-
readonly repository: Repository;
|
|
47
|
-
/** The GitHub user who submitted this entry */
|
|
48
|
-
readonly postedBy: User;
|
|
49
|
-
/** A timestamp of when the entry was submitted */
|
|
50
|
-
readonly createdAt: Scalars['Float'];
|
|
51
|
-
/** The score of this repository, upvotes - downvotes */
|
|
52
|
-
readonly score: Scalars['Int'];
|
|
53
|
-
/** The hot score of this repository */
|
|
54
|
-
readonly hotScore: Scalars['Float'];
|
|
55
|
-
/** Comments posted about this repository */
|
|
56
|
-
readonly comments: ReadonlyArray<Maybe<Comment>>;
|
|
57
|
-
/** The number of comments posted about this repository */
|
|
58
|
-
readonly commentCount: Scalars['Int'];
|
|
59
|
-
/** The SQL ID of this entry */
|
|
60
|
-
readonly id: Scalars['Int'];
|
|
61
|
-
/** XXX to be changed */
|
|
62
|
-
readonly vote: Vote;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/** Information about a GitHub repository submitted to GitHunt */
|
|
66
|
-
export type EntryCommentsArgs = {
|
|
67
|
-
limit?: Maybe<Scalars['Int']>;
|
|
68
|
-
offset?: Maybe<Scalars['Int']>;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* A repository object from the GitHub API. This uses the exact field names returned by the
|
|
73
|
-
* GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
|
|
74
|
-
*/
|
|
75
|
-
export type Repository = {
|
|
76
|
-
readonly __typename?: 'Repository';
|
|
77
|
-
/** Just the name of the repository, e.g. GitHunt-API */
|
|
78
|
-
readonly name: Scalars['String'];
|
|
79
|
-
/** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
|
|
80
|
-
readonly full_name: Scalars['String'];
|
|
81
|
-
/** The description of the repository */
|
|
82
|
-
readonly description?: Maybe<Scalars['String']>;
|
|
83
|
-
/** The link to the repository on GitHub */
|
|
84
|
-
readonly html_url: Scalars['String'];
|
|
85
|
-
/** The number of people who have starred this repository on GitHub */
|
|
86
|
-
readonly stargazers_count: Scalars['Int'];
|
|
87
|
-
/** The number of open issues on this repository on GitHub */
|
|
88
|
-
readonly open_issues_count?: Maybe<Scalars['Int']>;
|
|
89
|
-
/** The owner of this repository on GitHub, e.g. apollostack */
|
|
90
|
-
readonly owner?: Maybe<User>;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
|
|
94
|
-
export type User = {
|
|
95
|
-
readonly __typename?: 'User';
|
|
96
|
-
/** The name of the user, e.g. apollostack */
|
|
97
|
-
readonly login: Scalars['String'];
|
|
98
|
-
/** The URL to a directly embeddable image for this user's avatar */
|
|
99
|
-
readonly avatar_url: Scalars['String'];
|
|
100
|
-
/** The URL of this user's GitHub page */
|
|
101
|
-
readonly html_url: Scalars['String'];
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
/** A comment about an entry, submitted by a user */
|
|
105
|
-
export type Comment = {
|
|
106
|
-
readonly __typename?: 'Comment';
|
|
107
|
-
/** The SQL ID of this entry */
|
|
108
|
-
readonly id: Scalars['Int'];
|
|
109
|
-
/** The GitHub user who posted the comment */
|
|
110
|
-
readonly postedBy: User;
|
|
111
|
-
/** A timestamp of when the comment was posted */
|
|
112
|
-
readonly createdAt: Scalars['Float'];
|
|
113
|
-
/** The text of the comment */
|
|
114
|
-
readonly content: Scalars['String'];
|
|
115
|
-
/** The repository which this comment is about */
|
|
116
|
-
readonly repoName: Scalars['String'];
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/** XXX to be removed */
|
|
120
|
-
export type Vote = {
|
|
121
|
-
readonly __typename?: 'Vote';
|
|
122
|
-
readonly vote_value: Scalars['Int'];
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export type Mutation = {
|
|
126
|
-
readonly __typename?: 'Mutation';
|
|
127
|
-
/** Submit a new repository, returns the new submission */
|
|
128
|
-
readonly submitRepository?: Maybe<Entry>;
|
|
129
|
-
/** Vote on a repository submission, returns the submission that was voted on */
|
|
130
|
-
readonly vote?: Maybe<Entry>;
|
|
131
|
-
/** Comment on a repository, returns the new comment */
|
|
132
|
-
readonly submitComment?: Maybe<Comment>;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export type MutationSubmitRepositoryArgs = {
|
|
136
|
-
repoFullName: Scalars['String'];
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
export type MutationVoteArgs = {
|
|
140
|
-
repoFullName: Scalars['String'];
|
|
141
|
-
type: VoteType;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export type MutationSubmitCommentArgs = {
|
|
145
|
-
repoFullName: Scalars['String'];
|
|
146
|
-
commentContent: Scalars['String'];
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
/** The type of vote to record, when submitting a vote */
|
|
150
|
-
export enum VoteType {
|
|
151
|
-
Up = 'UP',
|
|
152
|
-
Down = 'DOWN',
|
|
153
|
-
Cancel = 'CANCEL',
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export type Subscription = {
|
|
157
|
-
readonly __typename?: 'Subscription';
|
|
158
|
-
/** Subscription fires on every comment added */
|
|
159
|
-
readonly commentAdded?: Maybe<Comment>;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export type SubscriptionCommentAddedArgs = {
|
|
163
|
-
repoFullName: Scalars['String'];
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export type OnCommentAddedSubscriptionVariables = Exact<{
|
|
167
|
-
repoFullName: Scalars['String'];
|
|
168
|
-
}>;
|
|
169
|
-
|
|
170
|
-
export type OnCommentAddedSubscription = { readonly __typename?: 'Subscription' } & {
|
|
171
|
-
readonly commentAdded?: Maybe<
|
|
172
|
-
{ readonly __typename?: 'Comment' } & Pick<Comment, 'id' | 'createdAt' | 'content'> & {
|
|
173
|
-
readonly postedBy: { readonly __typename?: 'User' } & Pick<User, 'login' | 'html_url'>;
|
|
174
|
-
}
|
|
175
|
-
>;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
export type CommentQueryVariables = Exact<{
|
|
179
|
-
repoFullName: Scalars['String'];
|
|
180
|
-
limit?: Maybe<Scalars['Int']>;
|
|
181
|
-
offset?: Maybe<Scalars['Int']>;
|
|
182
|
-
}>;
|
|
183
|
-
|
|
184
|
-
export type CommentQuery = { readonly __typename?: 'Query' } & {
|
|
185
|
-
readonly currentUser?: Maybe<{ readonly __typename?: 'User' } & Pick<User, 'login' | 'html_url'>>;
|
|
186
|
-
readonly entry?: Maybe<
|
|
187
|
-
{ readonly __typename?: 'Entry' } & Pick<Entry, 'id' | 'createdAt' | 'commentCount'> & {
|
|
188
|
-
readonly postedBy: { readonly __typename?: 'User' } & Pick<User, 'login' | 'html_url'>;
|
|
189
|
-
readonly comments: ReadonlyArray<Maybe<{ readonly __typename?: 'Comment' } & CommentsPageCommentFragment>>;
|
|
190
|
-
readonly repository: { readonly __typename?: 'Repository' } & Pick<
|
|
191
|
-
Repository,
|
|
192
|
-
'description' | 'open_issues_count' | 'stargazers_count' | 'full_name' | 'html_url'
|
|
193
|
-
>;
|
|
194
|
-
}
|
|
195
|
-
>;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
export type CommentsPageCommentFragment = { readonly __typename?: 'Comment' } & Pick<
|
|
199
|
-
Comment,
|
|
200
|
-
'id' | 'createdAt' | 'content'
|
|
201
|
-
> & { readonly postedBy: { readonly __typename?: 'User' } & Pick<User, 'login' | 'html_url'> };
|
|
202
|
-
|
|
203
|
-
export type CurrentUserForProfileQueryVariables = Exact<{ [key: string]: never }>;
|
|
204
|
-
|
|
205
|
-
export type CurrentUserForProfileQuery = { readonly __typename?: 'Query' } & {
|
|
206
|
-
readonly currentUser?: Maybe<{ readonly __typename?: 'User' } & Pick<User, 'login' | 'avatar_url'>>;
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
export type FeedEntryFragment = { readonly __typename?: 'Entry' } & Pick<Entry, 'id' | 'commentCount'> & {
|
|
210
|
-
readonly repository: { readonly __typename?: 'Repository' } & Pick<Repository, 'full_name' | 'html_url'> & {
|
|
211
|
-
readonly owner?: Maybe<{ readonly __typename?: 'User' } & Pick<User, 'avatar_url'>>;
|
|
212
|
-
};
|
|
213
|
-
} & VoteButtonsFragment &
|
|
214
|
-
RepoInfoFragment;
|
|
215
|
-
|
|
216
|
-
export type FeedQueryVariables = Exact<{
|
|
217
|
-
type: FeedType;
|
|
218
|
-
offset?: Maybe<Scalars['Int']>;
|
|
219
|
-
limit?: Maybe<Scalars['Int']>;
|
|
220
|
-
}>;
|
|
221
|
-
|
|
222
|
-
export type FeedQuery = { readonly __typename?: 'Query' } & {
|
|
223
|
-
readonly currentUser?: Maybe<{ readonly __typename?: 'User' } & Pick<User, 'login'>>;
|
|
224
|
-
readonly feed?: Maybe<ReadonlyArray<Maybe<{ readonly __typename?: 'Entry' } & FeedEntryFragment>>>;
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
export type SubmitRepositoryMutationVariables = Exact<{
|
|
228
|
-
repoFullName: Scalars['String'];
|
|
229
|
-
}>;
|
|
230
|
-
|
|
231
|
-
export type SubmitRepositoryMutation = { readonly __typename?: 'Mutation' } & {
|
|
232
|
-
readonly submitRepository?: Maybe<{ readonly __typename?: 'Entry' } & Pick<Entry, 'createdAt'>>;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
export type RepoInfoFragment = { readonly __typename?: 'Entry' } & Pick<Entry, 'createdAt'> & {
|
|
236
|
-
readonly repository: { readonly __typename?: 'Repository' } & Pick<
|
|
237
|
-
Repository,
|
|
238
|
-
'description' | 'stargazers_count' | 'open_issues_count'
|
|
239
|
-
>;
|
|
240
|
-
readonly postedBy: { readonly __typename?: 'User' } & Pick<User, 'html_url' | 'login'>;
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
export type SubmitCommentMutationVariables = Exact<{
|
|
244
|
-
repoFullName: Scalars['String'];
|
|
245
|
-
commentContent: Scalars['String'];
|
|
246
|
-
}>;
|
|
247
|
-
|
|
248
|
-
export type SubmitCommentMutation = { readonly __typename?: 'Mutation' } & {
|
|
249
|
-
readonly submitComment?: Maybe<{ readonly __typename?: 'Comment' } & CommentsPageCommentFragment>;
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
export type VoteButtonsFragment = { readonly __typename?: 'Entry' } & Pick<Entry, 'score'> & {
|
|
253
|
-
readonly vote: { readonly __typename?: 'Vote' } & Pick<Vote, 'vote_value'>;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
export type VoteMutationVariables = Exact<{
|
|
257
|
-
repoFullName: Scalars['String'];
|
|
258
|
-
type: VoteType;
|
|
259
|
-
}>;
|
|
260
|
-
|
|
261
|
-
export type VoteMutation = { readonly __typename?: 'Mutation' } & {
|
|
262
|
-
readonly vote?: Maybe<
|
|
263
|
-
{ readonly __typename?: 'Entry' } & Pick<Entry, 'score' | 'id'> & {
|
|
264
|
-
readonly vote: { readonly __typename?: 'Vote' } & Pick<Vote, 'vote_value'>;
|
|
265
|
-
}
|
|
266
|
-
>;
|
|
267
|
-
};
|
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
export type Maybe<T> = T | null;
|
|
2
|
-
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
|
3
|
-
/** All built-in and custom scalars, mapped to their actual values */
|
|
4
|
-
export type Scalars = {
|
|
5
|
-
ID: string;
|
|
6
|
-
String: string;
|
|
7
|
-
Boolean: boolean;
|
|
8
|
-
Int: number;
|
|
9
|
-
Float: number;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type Query = {
|
|
13
|
-
__typename?: 'Query';
|
|
14
|
-
/** A feed of repository submissions */
|
|
15
|
-
feed?: Maybe<Array<Maybe<Entry>>>;
|
|
16
|
-
/** A single entry */
|
|
17
|
-
entry?: Maybe<Entry>;
|
|
18
|
-
/** Return the currently logged in user, or null if nobody is logged in */
|
|
19
|
-
currentUser?: Maybe<User>;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type QueryFeedArgs = {
|
|
23
|
-
type: FeedType;
|
|
24
|
-
offset?: Maybe<Scalars['Int']>;
|
|
25
|
-
limit?: Maybe<Scalars['Int']>;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type QueryEntryArgs = {
|
|
29
|
-
repoFullName: Scalars['String'];
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/** A list of options for the sort order of the feed */
|
|
33
|
-
export enum FeedType {
|
|
34
|
-
/** Sort by a combination of freshness and score, using Reddit's algorithm */
|
|
35
|
-
Hot = 'HOT',
|
|
36
|
-
/** Newest entries first */
|
|
37
|
-
New = 'NEW',
|
|
38
|
-
/** Highest score entries first */
|
|
39
|
-
Top = 'TOP',
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** Information about a GitHub repository submitted to GitHunt */
|
|
43
|
-
export type Entry = {
|
|
44
|
-
__typename?: 'Entry';
|
|
45
|
-
/** Information about the repository from GitHub */
|
|
46
|
-
repository: Repository;
|
|
47
|
-
/** The GitHub user who submitted this entry */
|
|
48
|
-
postedBy: User;
|
|
49
|
-
/** A timestamp of when the entry was submitted */
|
|
50
|
-
createdAt: Scalars['Float'];
|
|
51
|
-
/** The score of this repository, upvotes - downvotes */
|
|
52
|
-
score: Scalars['Int'];
|
|
53
|
-
/** The hot score of this repository */
|
|
54
|
-
hotScore: Scalars['Float'];
|
|
55
|
-
/** Comments posted about this repository */
|
|
56
|
-
comments: Array<Maybe<Comment>>;
|
|
57
|
-
/** The number of comments posted about this repository */
|
|
58
|
-
commentCount: Scalars['Int'];
|
|
59
|
-
/** The SQL ID of this entry */
|
|
60
|
-
id: Scalars['Int'];
|
|
61
|
-
/** XXX to be changed */
|
|
62
|
-
vote: Vote;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/** Information about a GitHub repository submitted to GitHunt */
|
|
66
|
-
export type EntryCommentsArgs = {
|
|
67
|
-
limit?: Maybe<Scalars['Int']>;
|
|
68
|
-
offset?: Maybe<Scalars['Int']>;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* A repository object from the GitHub API. This uses the exact field names returned by the
|
|
73
|
-
* GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
|
|
74
|
-
*/
|
|
75
|
-
export type Repository = {
|
|
76
|
-
__typename?: 'Repository';
|
|
77
|
-
/** Just the name of the repository, e.g. GitHunt-API */
|
|
78
|
-
name: Scalars['String'];
|
|
79
|
-
/** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
|
|
80
|
-
full_name: Scalars['String'];
|
|
81
|
-
/** The description of the repository */
|
|
82
|
-
description?: Maybe<Scalars['String']>;
|
|
83
|
-
/** The link to the repository on GitHub */
|
|
84
|
-
html_url: Scalars['String'];
|
|
85
|
-
/** The number of people who have starred this repository on GitHub */
|
|
86
|
-
stargazers_count: Scalars['Int'];
|
|
87
|
-
/** The number of open issues on this repository on GitHub */
|
|
88
|
-
open_issues_count?: Maybe<Scalars['Int']>;
|
|
89
|
-
/** The owner of this repository on GitHub, e.g. apollostack */
|
|
90
|
-
owner?: Maybe<User>;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
|
|
94
|
-
export type User = {
|
|
95
|
-
__typename?: 'User';
|
|
96
|
-
/** The name of the user, e.g. apollostack */
|
|
97
|
-
login: Scalars['String'];
|
|
98
|
-
/** The URL to a directly embeddable image for this user's avatar */
|
|
99
|
-
avatar_url: Scalars['String'];
|
|
100
|
-
/** The URL of this user's GitHub page */
|
|
101
|
-
html_url: Scalars['String'];
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
/** A comment about an entry, submitted by a user */
|
|
105
|
-
export type Comment = {
|
|
106
|
-
__typename?: 'Comment';
|
|
107
|
-
/** The SQL ID of this entry */
|
|
108
|
-
id: Scalars['Int'];
|
|
109
|
-
/** The GitHub user who posted the comment */
|
|
110
|
-
postedBy: User;
|
|
111
|
-
/** A timestamp of when the comment was posted */
|
|
112
|
-
createdAt: Scalars['Float'];
|
|
113
|
-
/** The text of the comment */
|
|
114
|
-
content: Scalars['String'];
|
|
115
|
-
/** The repository which this comment is about */
|
|
116
|
-
repoName: Scalars['String'];
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/** XXX to be removed */
|
|
120
|
-
export type Vote = {
|
|
121
|
-
__typename?: 'Vote';
|
|
122
|
-
vote_value: Scalars['Int'];
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export type Mutation = {
|
|
126
|
-
__typename?: 'Mutation';
|
|
127
|
-
/** Submit a new repository, returns the new submission */
|
|
128
|
-
submitRepository?: Maybe<Entry>;
|
|
129
|
-
/** Vote on a repository submission, returns the submission that was voted on */
|
|
130
|
-
vote?: Maybe<Entry>;
|
|
131
|
-
/** Comment on a repository, returns the new comment */
|
|
132
|
-
submitComment?: Maybe<Comment>;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export type MutationSubmitRepositoryArgs = {
|
|
136
|
-
repoFullName: Scalars['String'];
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
export type MutationVoteArgs = {
|
|
140
|
-
repoFullName: Scalars['String'];
|
|
141
|
-
type: VoteType;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export type MutationSubmitCommentArgs = {
|
|
145
|
-
repoFullName: Scalars['String'];
|
|
146
|
-
commentContent: Scalars['String'];
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
/** The type of vote to record, when submitting a vote */
|
|
150
|
-
export enum VoteType {
|
|
151
|
-
Up = 'UP',
|
|
152
|
-
Down = 'DOWN',
|
|
153
|
-
Cancel = 'CANCEL',
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export type Subscription = {
|
|
157
|
-
__typename?: 'Subscription';
|
|
158
|
-
/** Subscription fires on every comment added */
|
|
159
|
-
commentAdded?: Maybe<Comment>;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export type SubscriptionCommentAddedArgs = {
|
|
163
|
-
repoFullName: Scalars['String'];
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export type OnCommentAddedSubscriptionVariables = Exact<{
|
|
167
|
-
repoFullName: Scalars['String'];
|
|
168
|
-
}>;
|
|
169
|
-
|
|
170
|
-
export type OnCommentAddedSubscription = {
|
|
171
|
-
__typename?: 'Subscription';
|
|
172
|
-
commentAdded?: Maybe<{
|
|
173
|
-
__typename?: 'Comment';
|
|
174
|
-
id: number;
|
|
175
|
-
createdAt: number;
|
|
176
|
-
content: string;
|
|
177
|
-
postedBy: { __typename?: 'User'; login: string; html_url: string };
|
|
178
|
-
}>;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
export type CommentQueryVariables = Exact<{
|
|
182
|
-
repoFullName: Scalars['String'];
|
|
183
|
-
limit?: Maybe<Scalars['Int']>;
|
|
184
|
-
offset?: Maybe<Scalars['Int']>;
|
|
185
|
-
}>;
|
|
186
|
-
|
|
187
|
-
export type CommentQuery = {
|
|
188
|
-
__typename?: 'Query';
|
|
189
|
-
currentUser?: Maybe<{ __typename?: 'User'; login: string; html_url: string }>;
|
|
190
|
-
entry?: Maybe<{
|
|
191
|
-
__typename?: 'Entry';
|
|
192
|
-
id: number;
|
|
193
|
-
createdAt: number;
|
|
194
|
-
commentCount: number;
|
|
195
|
-
postedBy: { __typename?: 'User'; login: string; html_url: string };
|
|
196
|
-
comments: Array<Maybe<{ __typename?: 'Comment' } & CommentsPageCommentFragment>>;
|
|
197
|
-
repository: {
|
|
198
|
-
__typename?: 'Repository';
|
|
199
|
-
description?: Maybe<string>;
|
|
200
|
-
open_issues_count?: Maybe<number>;
|
|
201
|
-
stargazers_count: number;
|
|
202
|
-
full_name: string;
|
|
203
|
-
html_url: string;
|
|
204
|
-
};
|
|
205
|
-
}>;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
export type CommentsPageCommentFragment = {
|
|
209
|
-
__typename?: 'Comment';
|
|
210
|
-
id: number;
|
|
211
|
-
createdAt: number;
|
|
212
|
-
content: string;
|
|
213
|
-
postedBy: { __typename?: 'User'; login: string; html_url: string };
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
export type CurrentUserForProfileQueryVariables = Exact<{ [key: string]: never }>;
|
|
217
|
-
|
|
218
|
-
export type CurrentUserForProfileQuery = {
|
|
219
|
-
__typename?: 'Query';
|
|
220
|
-
currentUser?: Maybe<{ __typename?: 'User'; login: string; avatar_url: string }>;
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
export type FeedEntryFragment = {
|
|
224
|
-
__typename?: 'Entry';
|
|
225
|
-
id: number;
|
|
226
|
-
commentCount: number;
|
|
227
|
-
repository: {
|
|
228
|
-
__typename?: 'Repository';
|
|
229
|
-
full_name: string;
|
|
230
|
-
html_url: string;
|
|
231
|
-
owner?: Maybe<{ __typename?: 'User'; avatar_url: string }>;
|
|
232
|
-
};
|
|
233
|
-
} & VoteButtonsFragment &
|
|
234
|
-
RepoInfoFragment;
|
|
235
|
-
|
|
236
|
-
export type FeedQueryVariables = Exact<{
|
|
237
|
-
type: FeedType;
|
|
238
|
-
offset?: Maybe<Scalars['Int']>;
|
|
239
|
-
limit?: Maybe<Scalars['Int']>;
|
|
240
|
-
}>;
|
|
241
|
-
|
|
242
|
-
export type FeedQuery = {
|
|
243
|
-
__typename?: 'Query';
|
|
244
|
-
currentUser?: Maybe<{ __typename?: 'User'; login: string }>;
|
|
245
|
-
feed?: Maybe<Array<Maybe<{ __typename?: 'Entry' } & FeedEntryFragment>>>;
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
export type SubmitRepositoryMutationVariables = Exact<{
|
|
249
|
-
repoFullName: Scalars['String'];
|
|
250
|
-
}>;
|
|
251
|
-
|
|
252
|
-
export type SubmitRepositoryMutation = {
|
|
253
|
-
__typename?: 'Mutation';
|
|
254
|
-
submitRepository?: Maybe<{ __typename?: 'Entry'; createdAt: number }>;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
export type RepoInfoFragment = {
|
|
258
|
-
__typename?: 'Entry';
|
|
259
|
-
createdAt: number;
|
|
260
|
-
repository: {
|
|
261
|
-
__typename?: 'Repository';
|
|
262
|
-
description?: Maybe<string>;
|
|
263
|
-
stargazers_count: number;
|
|
264
|
-
open_issues_count?: Maybe<number>;
|
|
265
|
-
};
|
|
266
|
-
postedBy: { __typename?: 'User'; html_url: string; login: string };
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
export type SubmitCommentMutationVariables = Exact<{
|
|
270
|
-
repoFullName: Scalars['String'];
|
|
271
|
-
commentContent: Scalars['String'];
|
|
272
|
-
}>;
|
|
273
|
-
|
|
274
|
-
export type SubmitCommentMutation = {
|
|
275
|
-
__typename?: 'Mutation';
|
|
276
|
-
submitComment?: Maybe<{ __typename?: 'Comment' } & CommentsPageCommentFragment>;
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
export type VoteButtonsFragment = {
|
|
280
|
-
__typename?: 'Entry';
|
|
281
|
-
score: number;
|
|
282
|
-
vote: { __typename?: 'Vote'; vote_value: number };
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
export type VoteMutationVariables = Exact<{
|
|
286
|
-
repoFullName: Scalars['String'];
|
|
287
|
-
type: VoteType;
|
|
288
|
-
}>;
|
|
289
|
-
|
|
290
|
-
export type VoteMutation = {
|
|
291
|
-
__typename?: 'Mutation';
|
|
292
|
-
vote?: Maybe<{ __typename?: 'Entry'; score: number; id: number; vote: { __typename?: 'Vote'; vote_value: number } }>;
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
export namespace OnCommentAdded {
|
|
296
|
-
export type Variables = OnCommentAddedSubscriptionVariables;
|
|
297
|
-
export type Subscription = OnCommentAddedSubscription;
|
|
298
|
-
export type CommentAdded = NonNullable<OnCommentAddedSubscription['commentAdded']>;
|
|
299
|
-
export type PostedBy = NonNullable<NonNullable<OnCommentAddedSubscription['commentAdded']>['postedBy']>;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export namespace Comment {
|
|
303
|
-
export type Variables = CommentQueryVariables;
|
|
304
|
-
export type Query = CommentQuery;
|
|
305
|
-
export type CurrentUser = NonNullable<CommentQuery['currentUser']>;
|
|
306
|
-
export type Entry = NonNullable<CommentQuery['entry']>;
|
|
307
|
-
export type PostedBy = NonNullable<NonNullable<CommentQuery['entry']>['postedBy']>;
|
|
308
|
-
export type Comments = NonNullable<NonNullable<NonNullable<CommentQuery['entry']>['comments']>[number]>;
|
|
309
|
-
export type Repository = NonNullable<NonNullable<CommentQuery['entry']>['repository']>;
|
|
310
|
-
export type RepositoryInlineFragment = { __typename: 'Repository' } & Pick<
|
|
311
|
-
NonNullable<NonNullable<CommentQuery['entry']>['repository']>,
|
|
312
|
-
'description' | 'open_issues_count' | 'stargazers_count'
|
|
313
|
-
>;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export namespace CommentsPageComment {
|
|
317
|
-
export type Fragment = CommentsPageCommentFragment;
|
|
318
|
-
export type PostedBy = NonNullable<CommentsPageCommentFragment['postedBy']>;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
export namespace CurrentUserForProfile {
|
|
322
|
-
export type Variables = CurrentUserForProfileQueryVariables;
|
|
323
|
-
export type Query = CurrentUserForProfileQuery;
|
|
324
|
-
export type CurrentUser = NonNullable<CurrentUserForProfileQuery['currentUser']>;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export namespace FeedEntry {
|
|
328
|
-
export type Fragment = FeedEntryFragment;
|
|
329
|
-
export type Repository = NonNullable<FeedEntryFragment['repository']>;
|
|
330
|
-
export type Owner = NonNullable<NonNullable<FeedEntryFragment['repository']>['owner']>;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export namespace Feed {
|
|
334
|
-
export type Variables = FeedQueryVariables;
|
|
335
|
-
export type Query = FeedQuery;
|
|
336
|
-
export type CurrentUser = NonNullable<FeedQuery['currentUser']>;
|
|
337
|
-
export type Feed = NonNullable<NonNullable<FeedQuery['feed']>[number]>;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
export namespace SubmitRepository {
|
|
341
|
-
export type Variables = SubmitRepositoryMutationVariables;
|
|
342
|
-
export type Mutation = SubmitRepositoryMutation;
|
|
343
|
-
export type SubmitRepository = NonNullable<SubmitRepositoryMutation['submitRepository']>;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
export namespace RepoInfo {
|
|
347
|
-
export type Fragment = RepoInfoFragment;
|
|
348
|
-
export type Repository = NonNullable<RepoInfoFragment['repository']>;
|
|
349
|
-
export type PostedBy = NonNullable<RepoInfoFragment['postedBy']>;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export namespace SubmitComment {
|
|
353
|
-
export type Variables = SubmitCommentMutationVariables;
|
|
354
|
-
export type Mutation = SubmitCommentMutation;
|
|
355
|
-
export type SubmitComment = NonNullable<SubmitCommentMutation['submitComment']>;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
export namespace VoteButtons {
|
|
359
|
-
export type Fragment = VoteButtonsFragment;
|
|
360
|
-
export type Vote = NonNullable<VoteButtonsFragment['vote']>;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
export namespace Vote {
|
|
364
|
-
export type Variables = VoteMutationVariables;
|
|
365
|
-
export type Mutation = VoteMutation;
|
|
366
|
-
export type Vote = NonNullable<VoteMutation['vote']>;
|
|
367
|
-
export type _Vote = NonNullable<NonNullable<VoteMutation['vote']>['vote']>;
|
|
368
|
-
}
|