-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
Codecov Report
@@ Coverage Diff @@
## main #81 +/- ##
==========================================
- Coverage 36.32% 36.27% -0.05%
==========================================
Files 315 317 +2
Lines 28718 28774 +56
==========================================
+ Hits 10432 10439 +7
- Misses 17335 17384 +49
Partials 951 951
|
code refactoring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improper design: BSON should not be used directly in use cases. The concerns about a specific DBMS (in this case MongoDB) are affecting the use case layer, which should be independent of the specific DBMS. Some model of search criteria should be defined in the domain or use case layer. That domain model is converted to BSON in each DBMS implementation, e.g. in MongoDB implementation.
# Conflicts: # internal/adapter/gql/resolver_query.go # internal/adapter/gql/resolver_team.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KaWaite found bugs:
- SIZE and NAME sorting in reverse is messing up.
- First query seems okay. If I ask for 20, it gives me the sorted 20.
- But the second query, so for example ..., sort: SIZE, pagination: {last: 20, before: "EndCursor"} returns for me 19 of the original 20 sorted results.
Overview
Adding infinite scroll to assets means we need to move filter/sorting and searching of assets to the backend during pagination.
What I've done
Memo
before
andlast
it'll be reversed, orfirst
andafter
the results will be in normal order. Front-end will pass the appropriate params depending on if the user selects reverse order or not