@@ -13,11 +13,14 @@ This library does not provide any networking, caching or other client functional
13
13
``` rust
14
14
#[derive(GraphQLQuery )]
15
15
#[gql(
16
+ // The paths are relative to the directory where your `Cargo.toml` is located.
16
17
query_path = " src/graphql/queries/my_query.graphql" ,
17
18
schema_path = " src/graphql/schema.json"
18
19
)]
19
20
struct MyQuery ;
21
+ ```
20
22
23
+ ``` rust
21
24
fn perform_my_query (variables : & my_query :: Variables ) -> Result <(), failure :: Error > {
22
25
let body = MyQuery :: expand (variables );
23
26
let client = reqwest :: Client :: new ();
@@ -27,9 +30,7 @@ fn perform_my_query(variables: &my_query::Variables) -> Result<(), failure::Erro
27
30
}
28
31
```
29
32
30
- The paths in the ` gql ` attribute are relative to the directory where your ` Cargo.toml ` is located.
31
-
32
- The GraphQL schema language and schema.json are both supported as sources for the schema.
33
+ The GraphQL schema language (` .graphql ` ) and ` schema.json ` are both supported as sources for the schema.
33
34
34
35
` serde_derive ` needs to be visible in the context of the ` GraphQLQuery ` derive (add it as an ` extern crate ` ).
35
36
@@ -56,3 +57,23 @@ See the [example generated module](https://www.tomhoule.com/docs/example_module/
56
57
## Examples
57
58
58
59
See the examples directory in this project.
60
+
61
+ ## Code of conduct
62
+
63
+ Anyone who interacts with this project in any space, including but not limited to
64
+ this GitHub repository, must follow our [ code of conduct] ( https://github.com/tomhoule/graphql-client/blob/master/CODE_OF CONDUCT.md ) .
65
+
66
+ ## License
67
+
68
+ Licensed under either of these:
69
+
70
+ * Apache License, Version 2.0, ([ LICENSE-APACHE] ( LICENSE-APACHE ) or
71
+ https://www.apache.org/licenses/LICENSE-2.0 )
72
+ * MIT license ([ LICENSE-MIT] ( LICENSE-MIT ) or
73
+ https://opensource.org/licenses/MIT )
74
+
75
+ ### Contributing
76
+
77
+ Unless you explicitly state otherwise, any contribution you intentionally submit
78
+ for inclusion in the work, as defined in the Apache-2.0 license, shall be
79
+ dual-licensed as above, without any additional terms or conditions.
0 commit comments