Skip to content

Commit

Permalink
Use new repoMostHonoredContributors (#94)
Browse files Browse the repository at this point in the history
* change generated-gql
fix leaderboard

* remove unecessary default setting
  • Loading branch information
aldolamb committed May 11, 2023
1 parent 185e3f8 commit 0a45c8c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/components/repo/RepoLeaderBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export type RepoLeaderBoardProps = {
export const RepoLeaderBoard = ({ repoId }: RepoLeaderBoardProps) => {
const [result] = useRepoLeadersQuery({
variables: {
count: 6,
repoId: repoId,
},
});
Expand Down
10 changes: 6 additions & 4 deletions src/graphql/generated-gql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2875,7 +2875,8 @@ export type QueryRepoGitPoaPsArgs = {
};

export type QueryRepoMostHonoredContributorsArgs = {
count?: InputMaybe<Scalars['Float']>;
page?: InputMaybe<Scalars['Float']>;
perPage?: InputMaybe<Scalars['Float']>;
repoId: Scalars['Float'];
};

Expand Down Expand Up @@ -3569,8 +3570,9 @@ export type LeadersQuery = {
};

export type RepoLeadersQueryVariables = Exact<{
count: Scalars['Float'];
repoId: Scalars['Float'];
page?: InputMaybe<Scalars['Float']>;
perPage?: InputMaybe<Scalars['Float']>;
}>;

export type RepoLeadersQuery = {
Expand Down Expand Up @@ -4365,8 +4367,8 @@ export function useLeadersQuery(options: Omit<Urql.UseQueryArgs<LeadersQueryVari
return Urql.useQuery<LeadersQuery>({ query: LeadersDocument, ...options });
}
export const RepoLeadersDocument = gql`
query repoLeaders($count: Float!, $repoId: Float!) {
repoMostHonoredContributors(count: $count, repoId: $repoId) {
query repoLeaders($repoId: Float!, $page: Float, $perPage: Float) {
repoMostHonoredContributors(repoId: $repoId, page: $page, perPage: $perPage) {
profile {
address
id
Expand Down
4 changes: 2 additions & 2 deletions src/graphql/operations.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ query leaders($count: Float!) {
}
}

query repoLeaders($count: Float!, $repoId: Float!) {
repoMostHonoredContributors(count: $count, repoId: $repoId) {
query repoLeaders($repoId: Float!, $page: Float, $perPage: Float) {
repoMostHonoredContributors(repoId: $repoId, page: $page, perPage: $perPage) {
profile {
address
id
Expand Down

0 comments on commit 0a45c8c

Please sign in to comment.