-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
comment.query.stencil-component.tsx
81 lines (77 loc) · 2.13 KB
/
comment.query.stencil-component.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import gql from 'graphql-tag';
import { CommentsPageCommentFragmentDoc } from './comments-page-comment.fragment.stencil-component.js';
import 'stencil-apollo';
import { Component, Prop, h } from '@stencil/core';
declare global {
export type CommentQueryVariables = Types.Exact<{
repoFullName: Types.Scalars['String'];
limit?: Types.InputMaybe<Types.Scalars['Int']>;
offset?: Types.InputMaybe<Types.Scalars['Int']>;
}>;
export type CommentQuery = {
__typename?: 'Query';
currentUser?: { __typename?: 'User'; login: string; html_url: string } | null;
entry?: {
__typename?: 'Entry';
id: number;
createdAt: number;
commentCount: number;
postedBy: { __typename?: 'User'; login: string; html_url: string };
comments: Array<{
__typename?: 'Comment';
id: number;
createdAt: number;
content: string;
postedBy: { __typename?: 'User'; login: string; html_url: string };
} | null>;
repository: {
__typename?: 'Repository';
description?: string | null;
open_issues_count?: number | null;
stargazers_count: number;
full_name: string;
html_url: string;
};
} | null;
};
}
const CommentDocument = gql`
query Comment($repoFullName: String!, $limit: Int, $offset: Int) {
currentUser {
login
html_url
}
entry(repoFullName: $repoFullName) {
id
postedBy {
login
html_url
}
createdAt
comments(limit: $limit, offset: $offset) {
...CommentsPageComment
}
commentCount
repository {
full_name
html_url
... on Repository {
description
open_issues_count
stargazers_count
}
}
}
}
${CommentsPageCommentFragmentDoc}
`;
@Component({
tag: 'apollo-comment',
})
export class CommentComponent {
@Prop() renderer: import('stencil-apollo').QueryRenderer<CommentQuery, CommentQueryVariables>;
@Prop() variables: CommentQueryVariables;
render() {
return <apollo-query query={CommentDocument} variables={this.variables} renderer={this.renderer} />;
}
}