Skip to content

Commit c137fbe

Browse files
committed
Update the graphql_client_cli README
1 parent 03f583d commit c137fbe

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

graphql_client_cli/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ This is still a WIP, the main use for it now is to download the `schema.json` fr
44

55
## Install
66

7-
```
7+
```bash
88
cargo install graphql_client_cli --force
99
```
1010

1111
## introspect schema
1212

1313
```
14+
Get the schema from a live GraphQL API. The schema is printed to stdout.
15+
1416
USAGE:
1517
graphql-client introspect-schema [OPTIONS] <schema_location>
1618
@@ -19,7 +21,7 @@ FLAGS:
1921
-V, --version Prints version information
2022
2123
OPTIONS:
22-
--authorization <authorization>
24+
--authorization <authorization> Set the contents of the Authorizaiton header.
2325
--output <output> Where to write the JSON for the introspected schema.
2426
2527
ARGS:
@@ -30,7 +32,7 @@ ARGS:
3032

3133
```
3234
USAGE:
33-
graphql-client generate [FLAGS] [OPTIONS] <query_path> <schema_path> <module_name> <output>
35+
graphql-client generate [FLAGS] [OPTIONS] <query_path> <schema_path>
3436
3537
FLAGS:
3638
-h, --help Prints help information
@@ -45,17 +47,20 @@ OPTIONS:
4547
-d, --deprecation-strategy <deprecation_strategy>
4648
You can choose deprecation strategy from allow, deny, or warn. Default value is warn.
4749
50+
-m, --module_visibility <module_visibility>
51+
You can choose module and target struct visibility from pub and private. Default value is pub.
52+
4853
-o, --selected-operation <selected_operation>
4954
Name of target query. If you don't set this parameter, cli generate all queries in query file.
5055
5156
5257
ARGS:
5358
<query_path> Path to graphql query file.
5459
<schema_path> Path to graphql schema file.
55-
<module_name> Name of module.
56-
<output> Path you want to output to.
5760
```
5861

5962
If you want to use formatting feature, you should install like this.
6063

61-
`cargo install graphql_client_cli --features rustfmt --force`
64+
```bash
65+
cargo install graphql_client_cli --features rustfmt --force
66+
```

graphql_client_cli/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use structopt::StructOpt;
2626

2727
#[derive(StructOpt)]
2828
enum Cli {
29+
/// Get the schema from a live GraphQL API. The schema is printed to stdout.
2930
#[structopt(name = "introspect-schema")]
3031
IntrospectSchema {
3132
/// The URL of a GraphQL endpoint to introspect.

graphql_query_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn graphql_query_derive(input: proc_macro::TokenStream) -> proc_macro::Token
2727
acc.push_str(&format!("{}\n", item));
2828
acc
2929
})
30-
.trim_end_matches("\n")
30+
.trim_end_matches('\n')
3131
),
3232
}
3333
}

0 commit comments

Comments
 (0)