Skip to content

Commit

Permalink
Fix news digest page queries (#3051)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdcp1 authored Sep 2, 2024
1 parent cfeed12 commit 5917ec7
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions site/gatsby-site/src/pages/apps/newsdigest.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,41 @@ export default function NewsSearchPage() {

const { data: submissionsData } = useQuery(
gql`
query ExistingSubmissions($query: SubmissionQueryInput!) {
submissions(query: $query, limit: 9999) {
query ExistingSubmissions($filter: SubmissionFilterType!) {
submissions(filter: $filter) {
url
}
}
`,
{ variables: { query: { url_in: newsArticleUrls } } }
{
variables: {
filter: {
url: {
IN: newsArticleUrls,
},
},
},
}
);

const { data: reportsData } = useQuery(
gql`
query ExistingReports($query: ReportQueryInput!) {
reports(query: $query, limit: 9999) {
query ExistingReports($filter: ReportFilterType!) {
reports(filter: $filter) {
report_number
url
}
}
`,
{ variables: { query: { url_in: newsArticleUrls } } }
{
variables: {
filter: {
url: {
IN: newsArticleUrls,
},
},
},
}
);

const [updateCandidate] = useMutation(gql`
Expand Down

0 comments on commit 5917ec7

Please sign in to comment.