@@ -4,13 +4,15 @@ This is still a WIP, the main use for it now is to download the `schema.json` fr
4
4
5
5
## Install
6
6
7
- ```
7
+ ``` bash
8
8
cargo install graphql_client_cli --force
9
9
```
10
10
11
11
## introspect schema
12
12
13
13
```
14
+ Get the schema from a live GraphQL API. The schema is printed to stdout.
15
+
14
16
USAGE:
15
17
graphql-client introspect-schema [OPTIONS] <schema_location>
16
18
19
21
-V, --version Prints version information
20
22
21
23
OPTIONS:
22
- --authorization <authorization>
24
+ --authorization <authorization> Set the contents of the Authorizaiton header.
23
25
--output <output> Where to write the JSON for the introspected schema.
24
26
25
27
ARGS:
30
32
31
33
```
32
34
USAGE:
33
- graphql-client generate [FLAGS] [OPTIONS] <query_path> <schema_path> <module_name> <output>
35
+ graphql-client generate [FLAGS] [OPTIONS] <query_path> <schema_path>
34
36
35
37
FLAGS:
36
38
-h, --help Prints help information
@@ -45,17 +47,20 @@ OPTIONS:
45
47
-d, --deprecation-strategy <deprecation_strategy>
46
48
You can choose deprecation strategy from allow, deny, or warn. Default value is warn.
47
49
50
+ -m, --module_visibility <module_visibility>
51
+ You can choose module and target struct visibility from pub and private. Default value is pub.
52
+
48
53
-o, --selected-operation <selected_operation>
49
54
Name of target query. If you don't set this parameter, cli generate all queries in query file.
50
55
51
56
52
57
ARGS:
53
58
<query_path> Path to graphql query file.
54
59
<schema_path> Path to graphql schema file.
55
- <module_name> Name of module.
56
- <output> Path you want to output to.
57
60
```
58
61
59
62
If you want to use formatting feature, you should install like this.
60
63
61
- ` cargo install graphql_client_cli --features rustfmt --force `
64
+ ``` bash
65
+ cargo install graphql_client_cli --features rustfmt --force
66
+ ```
0 commit comments