You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. If using `cynic`, use the cynic generator to generate the Rust types from the GraphQL schema. \
34
-
Go to https://generator.cynic-rs.dev/ and paste the URL to the GraphQL service or manually copy paste the schema. \
34
+
Go to <https://generator.cynic-rs.dev/> and paste the URL to the GraphQL service or manually copy paste the schema. \
35
35
Then you can select the fields in the query you want to have, and the generator will generate the Rust types for you.
36
36
37
37
5. In your Rust code, you can now use the custom query types generated by `cynic`.
@@ -57,6 +57,6 @@ async fn main() {
57
57
}
58
58
```
59
59
60
-
6. For `UInt53`, you can use `u64` type directly as the `sui-graphql-client`'s schema implements the `impl_scalar`. Similarly for other types (Base64, DateTime). See more available types here: https://github.com/MystenLabs/sui-rust-sdk/blob/02639f6b09375fe03fa2243868be17bec1dfa33c/crates/sui-graphql-client/src/query_types/mod.rs?plain=1#L124-L126
60
+
6. For `UInt53`, you can use `u64` type directly as the `sui-graphql-client`'s schema implements the `impl_scalar`. Similarly for other types (Base64, DateTime). See more available types here: <https://github.com/MystenLabs/sui-rust-sdk/blob/02639f6b09375fe03fa2243868be17bec1dfa33c/crates/sui-graphql-client/src/query_types/mod.rs?plain=1#L124-L126>
61
61
62
62
7. Read the `cynic`[documentation](https://cynic-rs.dev/) to learn how to work with it, particularly when it comes to passing arguments to the query.
Copy file name to clipboardExpand all lines: crates/sui-graphql-client/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ async fn main() -> Result<()> {
67
67
```
68
68
69
69
### Example for custom faucet service.
70
-
Note that this [`FaucetClient`] is explicitly designed to work with two endpoints: `v1/gas`, and `v1/status`. When passing in the custom faucet URL, skip the final endpoint and only pass in the top-level url (e.g., `https://faucet.devnet.sui.io`).
70
+
Note that this `FaucetClient` is explicitly designed to work with two endpoints: `v1/gas`, and `v1/status`. When passing in the custom faucet URL, skip the final endpoint and only pass in the top-level url (e.g., `https://faucet.devnet.sui.io`).
0 commit comments