forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GraphQL/Cursor] Refactor Events Pagination (MystenLabs#15528)
## Descriptions This PR applies the various preceding abstractions (cursor and pagination frameworks) to `Query.eventConnection`, and renames it to `Query.events`. Events also support more expressive filters than previous types that we applied these frameworks to, in particular, they support filtering by modules and types, so we introduce `TypeFilter` and `ModuleFilter` (string) scalars as a new abstraction responsible for: - Parsing cascading filters of this kind. - Applying them as filters onto existing queries. The parsing implementation has also been made to uniformly rely on Move's parser for types and identifiers (previously it used Move's parser for types, but string manipulation for package and module based filters), which required exposing some more endpoints to Move's parser. ## Test Plan Existing E2E tests for events pagination: ``` sui-graphql-e2e-tests$ cargo nextest run \ -j 1 --features pg_integration \ -- event_connection/ ``` Plus new unit tests for `type_filter` module: ``` sui-graphql-rpc$ cargo nextest run -- type_filter ``` ## Stack - MystenLabs#15467 - MystenLabs#15470 - MystenLabs#15471 - MystenLabs#15472 - MystenLabs#15473 - MystenLabs#15474 - MystenLabs#15475 - MystenLabs#15484 - MystenLabs#15485 - MystenLabs#15519 - MystenLabs#15520 - MystenLabs#15521 - MystenLabs#15522 - MystenLabs#15523 - MystenLabs#15524 - MystenLabs#15525 - MystenLabs#15526 - MystenLabs#15527 - MystenLabs#15625
- Loading branch information
Showing
24 changed files
with
961 additions
and
684 deletions.
There are no files selected for viewing
417 changes: 222 additions & 195 deletions
417
crates/sui-graphql-e2e-tests/tests/event_connection/event_connection.exp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.