Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typescript-react-apollo): support useBackgroundQuery and useLoadableQuery #815

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 78 additions & 78 deletions dev-test/githunt/flow.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,54 +176,54 @@ export type OnCommentAddedSubscriptionVariables = {
repoFullName: $ElementType<Scalars, 'String'>,
};

export type OnCommentAddedSubscription = {|
export type OnCommentAddedSubscription = {
...{ __typename?: 'Subscription' },
...{|
commentAdded?: ?{|
commentAdded?: ?{
...{ __typename?: 'Comment' },
...$Pick<Comment, {| id: *, createdAt: *, content: * |}>,
...{|
postedBy: {|
postedBy: {
...{ __typename?: 'User' },
...$Pick<User, {| login: *, html_url: * |}>,
|},
},
|},
|},
},
|},
|};
};

export type CommentQueryVariables = {
repoFullName: $ElementType<Scalars, 'String'>,
limit?: ?$ElementType<Scalars, 'Int'>,
offset?: ?$ElementType<Scalars, 'Int'>,
};

export type CommentQuery = {|
export type CommentQuery = {
...{ __typename?: 'Query' },
...{|
currentUser?: ?{|
currentUser?: ?{
...{ __typename?: 'User' },
...$Pick<User, {| login: *, html_url: * |}>,
|},
entry?: ?{|
},
entry?: ?{
...{ __typename?: 'Entry' },
...$Pick<Entry, {| id: *, createdAt: *, commentCount: * |}>,
...{|
postedBy: {|
postedBy: {
...{ __typename?: 'User' },
...$Pick<User, {| login: *, html_url: * |}>,
|},
comments: Array<?{|
},
comments: Array<?{
...{ __typename?: 'Comment' },
...$Pick<Comment, {| id: *, createdAt: *, content: * |}>,
...{|
postedBy: {|
postedBy: {
...{ __typename?: 'User' },
...$Pick<User, {| login: *, html_url: * |}>,
|},
},
|},
|}>,
repository: {|
}>,
repository: {
...{ __typename?: 'Repository' },
...$Pick<
Repository,
Expand All @@ -235,40 +235,40 @@ export type CommentQuery = {|
html_url: *,
|},
>,
|},
},
|},
|},
},
|},
|};
};

export type CommentsPageCommentFragment = {|
export type CommentsPageCommentFragment = {
...{ __typename?: 'Comment' },
...$Pick<Comment, {| id: *, createdAt: *, content: * |}>,
...{|
postedBy: {|
postedBy: {
...{ __typename?: 'User' },
...$Pick<User, {| login: *, html_url: * |}>,
|},
},
|},
|};
};

export type CurrentUserForProfileQueryVariables = {};

export type CurrentUserForProfileQuery = {|
export type CurrentUserForProfileQuery = {
...{ __typename?: 'Query' },
...{|
currentUser?: ?{|
currentUser?: ?{
...{ __typename?: 'User' },
...$Pick<User, {| login: *, avatar_url: * |}>,
|},
},
|},
|};
};

export type FeedEntryFragment = {|
export type FeedEntryFragment = {
...{ __typename?: 'Entry' },
...$Pick<Entry, {| id: *, commentCount: *, score: *, createdAt: * |}>,
...{|
repository: {|
repository: {
...{ __typename?: 'Repository' },
...$Pick<
Repository,
Expand All @@ -281,41 +281,41 @@ export type FeedEntryFragment = {|
|},
>,
...{|
owner?: ?{|
owner?: ?{
...{ __typename?: 'User' },
...$Pick<User, {| avatar_url: * |}>,
|},
},
|},
|},
vote: {|
},
vote: {
...{ __typename?: 'Vote' },
...$Pick<Vote, {| vote_value: * |}>,
|},
postedBy: {|
},
postedBy: {
...{ __typename?: 'User' },
...$Pick<User, {| html_url: *, login: * |}>,
|},
},
|},
|};
};

export type FeedQueryVariables = {
type: FeedType,
offset?: ?$ElementType<Scalars, 'Int'>,
limit?: ?$ElementType<Scalars, 'Int'>,
};

export type FeedQuery = {|
export type FeedQuery = {
...{ __typename?: 'Query' },
...{|
currentUser?: ?{|
currentUser?: ?{
...{ __typename?: 'User' },
...$Pick<User, {| login: * |}>,
|},
feed?: ?Array<?{|
},
feed?: ?Array<?{
...{ __typename?: 'Entry' },
...$Pick<Entry, {| id: *, commentCount: *, score: *, createdAt: * |}>,
...{|
repository: {|
repository: {
...{ __typename?: 'Repository' },
...$Pick<
Repository,
Expand All @@ -328,103 +328,103 @@ export type FeedQuery = {|
|},
>,
...{|
owner?: ?{|
owner?: ?{
...{ __typename?: 'User' },
...$Pick<User, {| avatar_url: * |}>,
|},
},
|},
|},
vote: {|
},
vote: {
...{ __typename?: 'Vote' },
...$Pick<Vote, {| vote_value: * |}>,
|},
postedBy: {|
},
postedBy: {
...{ __typename?: 'User' },
...$Pick<User, {| html_url: *, login: * |}>,
|},
},
|},
|}>,
}>,
|},
|};
};

export type SubmitRepositoryMutationVariables = {
repoFullName: $ElementType<Scalars, 'String'>,
};

export type SubmitRepositoryMutation = {|
export type SubmitRepositoryMutation = {
...{ __typename?: 'Mutation' },
...{|
submitRepository?: ?{|
submitRepository?: ?{
...{ __typename?: 'Entry' },
...$Pick<Entry, {| createdAt: * |}>,
|},
},
|},
|};
};

export type RepoInfoFragment = {|
export type RepoInfoFragment = {
...{ __typename?: 'Entry' },
...$Pick<Entry, {| createdAt: * |}>,
...{|
repository: {|
repository: {
...{ __typename?: 'Repository' },
...$Pick<Repository, {| description?: *, stargazers_count: *, open_issues_count?: * |}>,
|},
postedBy: {|
},
postedBy: {
...{ __typename?: 'User' },
...$Pick<User, {| html_url: *, login: * |}>,
|},
},
|},
|};
};

export type SubmitCommentMutationVariables = {
repoFullName: $ElementType<Scalars, 'String'>,
commentContent: $ElementType<Scalars, 'String'>,
};

export type SubmitCommentMutation = {|
export type SubmitCommentMutation = {
...{ __typename?: 'Mutation' },
...{|
submitComment?: ?{|
submitComment?: ?{
...{ __typename?: 'Comment' },
...$Pick<Comment, {| id: *, createdAt: *, content: * |}>,
...{|
postedBy: {|
postedBy: {
...{ __typename?: 'User' },
...$Pick<User, {| login: *, html_url: * |}>,
|},
},
|},
|},
},
|},
|};
};

export type VoteButtonsFragment = {|
export type VoteButtonsFragment = {
...{ __typename?: 'Entry' },
...$Pick<Entry, {| score: * |}>,
...{|
vote: {|
vote: {
...{ __typename?: 'Vote' },
...$Pick<Vote, {| vote_value: * |}>,
|},
},
|},
|};
};

export type VoteMutationVariables = {
repoFullName: $ElementType<Scalars, 'String'>,
type: VoteType,
};

export type VoteMutation = {|
export type VoteMutation = {
...{ __typename?: 'Mutation' },
...{|
vote?: ?{|
vote?: ?{
...{ __typename?: 'Entry' },
...$Pick<Entry, {| score: *, id: * |}>,
...{|
vote: {|
vote: {
...{ __typename?: 'Vote' },
...$Pick<Vote, {| vote_value: * |}>,
|},
},
|},
|},
},
|},
|};
};
Loading