Skip to content

Commit 49bc0ca

Browse files
committed
Add license, code of conduct and contributing sections to README
1 parent cbacb1f commit 49bc0ca

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ This library does not provide any networking, caching or other client functional
1313
```rust
1414
#[derive(GraphQLQuery)]
1515
#[gql(
16+
// The paths are relative to the directory where your `Cargo.toml` is located.
1617
query_path = "src/graphql/queries/my_query.graphql",
1718
schema_path = "src/graphql/schema.json"
1819
)]
1920
struct MyQuery;
21+
```
2022

23+
```rust
2124
fn perform_my_query(variables: &my_query::Variables) -> Result<(), failure::Error> {
2225
let body = MyQuery::expand(variables);
2326
let client = reqwest::Client::new();
@@ -27,9 +30,7 @@ fn perform_my_query(variables: &my_query::Variables) -> Result<(), failure::Erro
2730
}
2831
```
2932

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.
3334

3435
`serde_derive` needs to be visible in the context of the `GraphQLQuery` derive (add it as an `extern crate`).
3536

@@ -56,3 +57,23 @@ See the [example generated module](https://www.tomhoule.com/docs/example_module/
5657
## Examples
5758

5859
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

Comments
 (0)