Skip to content

Commit

Permalink
add comment; update default
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Nov 27, 2023
1 parent 7153817 commit 8f2a772
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const enhanced = withFragmentContainer<Props>({
dsaReport: graphql`
fragment RelatedReports_dsaReport on DSAReport
@argumentDefinitions(
count: { type: "Int", defaultValue: 20 }
count: { type: "Int", defaultValue: 10 }
cursor: { type: "Cursor" }
orderBy: { type: "REPORT_SORT", defaultValue: CREATED_AT_DESC }
) {
Expand Down
3 changes: 2 additions & 1 deletion server/src/core/server/graph/loaders/DSAReports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default (ctx: GraphContext) => ({
relatedReports: (
submissionID: string,
id: string,
{ first, orderBy }: DSAReportToRelatedReportsArgs
{ first, orderBy, after }: DSAReportToRelatedReportsArgs
) =>
retrieveDSAReportRelatedReportsConnection(
ctx.mongo,
Expand All @@ -68,6 +68,7 @@ export default (ctx: GraphContext) => ({
{
first: defaultTo(first, 10),
orderBy: defaultTo(orderBy, GQLREPORT_SORT.CREATED_AT_DESC),
after,
}
),
});
4 changes: 4 additions & 0 deletions server/src/core/server/graph/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3662,6 +3662,10 @@ type DSAReport {
"""
lastUpdated: Time

"""
relatedReports are DSAReports that share a submissionID and were submitted at the same time
in one illegal content report
"""
relatedReports(
first: Int = 10 @constraint(max: 50)
orderBy: REPORT_SORT = CREATED_AT_DESC
Expand Down

0 comments on commit 8f2a772

Please sign in to comment.