Skip to content

Commit

Permalink
Fix query filter
Browse files Browse the repository at this point in the history
  • Loading branch information
kirgene committed Oct 26, 2021
1 parent fd0dcd9 commit a9f46ef
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mojaloop/reporting-hub-bop-api-svc",
"version": "1.0.12",
"version": "1.0.13",
"description": "Reporting API",
"scripts": {
"lint:fix": "eslint . --fix",
Expand Down
32 changes: 20 additions & 12 deletions src/schema/Transfer/Query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,26 @@ const Query = extendType({
lt: args.filter?.endDate || undefined,
},
currencyId: args.filter?.currency || undefined,
transferError: {
some: {
errorCode: args.filter?.errorCode || undefined,
},
},
transferStateChange: {
some: {
transferState: {
enumeration: args.filter?.transferState || undefined,
},
},
},
...(args.filter?.errorCode
? {
transferError: {
some: {
errorCode: args.filter?.errorCode || undefined,
},
},
}
: {}),
...(args.filter?.transferState
? {
transferStateChange: {
some: {
transferState: {
enumeration: args.filter?.transferState,
},
},
},
}
: {}),
...(args.filter?.settlementWindowId
? {
transferFulfilment: {
Expand Down

0 comments on commit a9f46ef

Please sign in to comment.