Skip to content

Commit 6a425cb

Browse files
authored
Merge pull request #56 from tomhoule/copy-docs
Copy doc strings from schema to generated types
2 parents f468877 + 815403c commit 6a425cb

File tree

19 files changed

+6108
-5889
lines changed

19 files changed

+6108
-5889
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## Unreleased
99

10+
### Added
11+
12+
- Copy documentation from the GraphQL schema to the generated types (including their fields) as normal Rust documentation. Documentation will show up in the generated docs as well as IDEs that support expanding derive macros (which does not include the RLS yet).
13+
1014
## [0.1.0] - 2018-07-04
1115

1216
This is the initial public release in which the library is considered usable.

examples/example_module/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ extern crate graphql_client;
66

77
#[derive(GraphQLQuery)]
88
#[graphql(
9-
schema_path = "../github/src/schema.graphql", query_path = "../github/src/query_1.graphql"
9+
schema_path = "../github/src/schema.graphql",
10+
query_path = "../github/src/query_1.graphql"
1011
)]
1112
pub struct ExampleModule;

examples/github/src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ use graphql_client::*;
1818
use structopt::StructOpt;
1919

2020
#[derive(GraphQLQuery)]
21-
#[graphql(schema_path = "src/schema.graphql", query_path = "src/query_1.graphql")]
21+
#[graphql(
22+
schema_path = "src/schema.graphql",
23+
query_path = "src/query_1.graphql"
24+
)]
2225
struct Query1;
2326

2427
#[derive(StructOpt)]

0 commit comments

Comments
 (0)