Skip to content

Conversation

ma2bd
Copy link
Contributor

@ma2bd ma2bd commented Sep 20, 2025

Motivation

Add some missing APIs + improve GraphQL code for collections

Proposal

  • support count() for collections
  • make SetView similar to MapView (GraphQL API breaking change)
  • (nit) remove unnecessary Clone bounds

Test Plan

CI + tested manually

Release Plan

These changes should be backported to the latest testnet branch, then be released in a new SDK.

(Note that the SDK will be breaking certain queries but that's ok)

@ma2bd ma2bd changed the title Counter collection views Add counter to collection and map views Sep 21, 2025
@ma2bd ma2bd requested review from Twey and MathieuDutSik September 21, 2025 02:27
Copy link
Contributor

@MathieuDutSik MathieuDutSik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem of this API change is that it is not tested. This is a problem but fortunately, here some tests can be done.

For example the count can be done on the bids / asks of the matching engine. So a simple addition to the end-to-end test suffices.

Another example is the number of accounts of the fungible, nfts of non-fungible, shares of amm among examples of MapView.

@ma2bd ma2bd requested a review from afck September 22, 2025 09:39
@ma2bd
Copy link
Contributor Author

ma2bd commented Sep 22, 2025

The code for SetView is now similar to MapView. I will test on the GOL app some more before landing.

@ma2bd ma2bd enabled auto-merge September 25, 2025 07:10
@ma2bd ma2bd added this pull request to the merge queue Sep 25, 2025
ma2bd added a commit that referenced this pull request Sep 25, 2025
## Motivation

Backport #4616

## Proposal

See #4616

## Test Plan

CI
Merged via the queue into linera-io:main with commit dfbe97f Sep 25, 2025
31 checks passed
@ma2bd ma2bd deleted the counter_collection_views branch September 25, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants