Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] fix: using-events graphql error (#20618)
## Description The GraphQL in [Query events with GraphQL](https://docs.sui.io/guides/developer/sui-101/using-events#query-events-with-graphql) has error ## Test plan 1. [crates/sui-graphql-rpc/examples/event_connection/event_connection.graphql](https://github.com/MystenLabs/sui/tree/main/crates/sui-graphql-rpc/examples/event_connection/event_connection.graphql) and [crates/sui-graphql-rpc/examples/event_connection/filter_by_sender.graphql](https://github.com/MystenLabs/sui/tree/main/crates/sui-graphql-rpc/examples/event_connection/filter_by_sender.graphql) throw the error ```json { "data": null, "errors": [ { "message": "Unknown field \"type\" on type \"Event\".", "locations": [ { "line": 18, "column": 7 } ] }, { "message": "Unknown field \"json\" on type \"Event\".", "locations": [ { "line": 25, "column": 7 } ] } ] } ``` need to be modified to ``` contents { type { repr } json } ``` 2. [crates/sui-graphql-rpc/examples/event_connection/filter_by_emitting_package_module_and_event_type.graphql](https://github.com/MystenLabs/sui/tree/main/crates/sui-graphql-rpc/examples/event_connection/filter_by_emitting_package_module_and_event_type.graphql) throw the error ```json { "data": null, "errors": [ { "message": "Filtering by both emitting module and event type is not supported", "locations": [ { "line": 2, "column": 3 } ], "path": [ "events" ], "extensions": { "code": "BAD_USER_INPUT" } } ] } ``` Read the [EventFilter.emittingModule doc](https://docs.sui.io/references/sui-api/sui-graphql/reference/types/inputs/event-filter#eventfilteremittingmodulestring-), it says `We currently do not support filtering by emitting module and event type at the same time so if both are provided in one filter, the query will error.`. So I think the doc need to delete the example `[Filter events by emitting package and type]` --- ## 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: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
- Loading branch information