Skip to content

Commit

Permalink
Merge pull request #253 from Giveth/add_projects_recipients_query
Browse files Browse the repository at this point in the history
Add project recipients query for givbacks using
  • Loading branch information
mateodaza authored Dec 15, 2021
2 parents a574282 + bd055f7 commit 2b6eb03
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions resolvers/projectResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,17 @@ export class ProjectResolver {
return results;
}

@Query(returns => [String])
async getProjectsRecipients(): Promise<String[]> {
const recipients = await Project.query(
`
SELECT "walletAddress" FROM project
WHERE verified=true
`,
);
return recipients.map(({ walletAddress }) => walletAddress);
}

@Query(returns => [Reaction])
async getProjectReactions(
@Arg('projectId') projectId: number,
Expand Down

0 comments on commit 2b6eb03

Please sign in to comment.