Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GraphQL] Deprecate exchange rates + staking pool resolver #17577

Conversation

stefan-mysten
Copy link
Contributor

@stefan-mysten stefan-mysten commented May 8, 2024

Description

Deprecates the exchange_rates and staking_pool resolvers on validator type, and adds a staking_pool_id and exchange_rates_table resolver to correctly return the staking pool id and the wrapped exchange rates object.

Test plan

Existing tests:

cd sui-graphql-e2e-tests && cargo nextest run --features pg_integration

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL: Deprecated the exchange_rates and staking_pool resolvers on validator type, and added a staking_pool_id and exchange_rates_table resolver to correctly return the staking pool ID and the wrapped exchange rates object.
  • CLI:
  • Rust SDK:

…g_pool_id and exchange_rates_table resolver to fix previous issues
Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 4:32pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview May 8, 2024 4:32pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview May 8, 2024 4:32pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview May 8, 2024 4:32pm

Copy link
Contributor

@wlmyng wlmyng left a comment

Choose a reason for hiding this comment

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

So if I understand correctly, the stakingPool is an object wrapped in the validator struct, and the exchangeRatesTable is a table wrapped in the stakingPool wrapped in the validator struct?

@stefan-mysten
Copy link
Contributor Author

So if I understand correctly, the stakingPool is an object wrapped in the validator struct, and the exchangeRatesTable is a table wrapped in the stakingPool wrapped in the validator struct?

That is correct.

@wlmyng
Copy link
Contributor

wlmyng commented May 8, 2024

So if I understand correctly, the stakingPool is an object wrapped in the validator struct, and the exchangeRatesTable is a table wrapped in the stakingPool wrapped in the validator struct?

That is correct.

that's wild man

@stefan-mysten stefan-mysten merged commit f172445 into MystenLabs:main May 8, 2024
46 of 47 checks passed
@stefan-mysten stefan-mysten deleted the gql_fix_exchange_rates_and_staking_pool_impls branch May 8, 2024 17:02
stefan-mysten added a commit to stefan-mysten/sui that referenced this pull request May 8, 2024
Deprecates the ` exchange_rates` and `staking_pool` resolvers on
validator type, and adds a `staking_pool_id` and `exchange_rates_table`
resolver to correctly return the staking pool id and the wrapped
exchange rates object.

Existing tests:
```
cd sui-graphql-e2e-tests && cargo nextest run --features pg_integration
```
---

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [x] GraphQL: Deprecated the ` exchange_rates` and `staking_pool`
resolvers on validator type, and added a `staking_pool_id` and
`exchange_rates_table` resolver to correctly return the staking pool id
and the wrapped exchange rates object.
- [ ] CLI:
- [ ] Rust SDK:
@stefan-mysten stefan-mysten changed the title [GraphQL] [GraphQL] Deprecate exchange rates + staking pool resolver May 8, 2024
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.

2 participants