Skip to content

Copy doc strings from schema to generated types #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

### Added

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

## [0.1.0] - 2018-07-04

This is the initial public release in which the library is considered usable.
Expand Down
3 changes: 2 additions & 1 deletion examples/example_module/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extern crate graphql_client;

#[derive(GraphQLQuery)]
#[graphql(
schema_path = "../github/src/schema.graphql", query_path = "../github/src/query_1.graphql"
schema_path = "../github/src/schema.graphql",
query_path = "../github/src/query_1.graphql"
)]
pub struct ExampleModule;
5 changes: 4 additions & 1 deletion examples/github/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ use graphql_client::*;
use structopt::StructOpt;

#[derive(GraphQLQuery)]
#[graphql(schema_path = "src/schema.graphql", query_path = "src/query_1.graphql")]
#[graphql(
schema_path = "src/schema.graphql",
query_path = "src/query_1.graphql"
)]
struct Query1;

#[derive(StructOpt)]
Expand Down
Loading