Merge pull request #204 from Koxiaet/master

Document default values
This commit is contained in:
Sunli 2020-07-07 16:55:08 +08:00 committed by GitHub
commit c0542382bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,15 +34,15 @@
//! //!
//! ## Features //! ## Features
//! //!
//! * Fully support async/await //! * Fully supports async/await
//! * Type safety //! * Type safety
//! * Rustfmt friendly (Procedural Macro) //! * Rustfmt friendly (Procedural Macro)
//! * Custom scalar //! * Custom scalars
//! * Minimal overhead //! * Minimal overhead
//! * Easy integration (hyper, actix_web, tide ...) //! * Easy integration (hyper, actix_web, tide ...)
//! * Upload files (Multipart request) //! * Upload files (Multipart request)
//! * Subscription (WebSocket transport) //! * Subscriptions (WebSocket transport)
//! * Custom extension //! * Custom extensions
//! * Apollo Tracing extension //! * Apollo Tracing extension
//! * Limit query complexity/depth //! * Limit query complexity/depth
//! * Error Extensions //! * Error Extensions
@ -210,12 +210,14 @@ pub use types::{EnumItem, EnumType};
/// ///
/// # Field argument parameters /// # Field argument parameters
/// ///
/// | Attribute | description | Type | Optional | /// | Attribute | description | Type | Optional |
/// |-------------|---------------------------|----------|----------| /// |--------------|------------------------------------------|------------ |----------|
/// | name | Argument name | string | Y | /// | name | Argument name | string | Y |
/// | desc | Argument description | string | Y | /// | desc | Argument description | string | Y |
/// | default | Argument default value | string | Y | /// | default | Use `Default::default` for default value | none | Y |
/// | validator | Input value validator | [`InputValueValidator`](validators/trait.InputValueValidator.html) | Y | /// | default | Argument default value | literal | Y |
/// | default_with | Expression to generate default value | code string | Y |
/// | validator | Input value validator | [`InputValueValidator`](validators/trait.InputValueValidator.html) | Y |
/// ///
/// # The field returns the value type /// # The field returns the value type
/// ///
@ -449,12 +451,14 @@ pub use async_graphql_derive::Enum;
/// ///
/// # Field parameters /// # Field parameters
/// ///
/// | Attribute | description | Type | Optional | /// | Attribute | description | Type | Optional |
/// |-------------|---------------------------|----------|----------| /// |--------------|------------------------------------------|----------|----------|
/// | name | Field name | string | Y | /// | name | Field name | string | Y |
/// | desc | Field description | string | Y | /// | desc | Field description | string | Y |
/// | default | Field default value | string | Y | /// | default | Use `Default::default` for default value | none | Y |
/// | validator | Input value validator | [`InputValueValidator`](validators/trait.InputValueValidator.html) | Y | /// | default | Argument default value | literal | Y |
/// | default_with | Expression to generate default value | code string | Y |
/// | validator | Input value validator | [`InputValueValidator`](validators/trait.InputValueValidator.html) | Y |
/// ///
/// # Examples /// # Examples
/// ///
@ -513,12 +517,14 @@ pub use async_graphql_derive::InputObject;
/// ///
/// # Field argument parameters /// # Field argument parameters
/// ///
/// | Attribute | description | Type | Optional | /// | Attribute | description | Type | Optional |
/// |-------------|---------------------------|----------|----------| /// |--------------|------------------------------------------|-------------|----------|
/// | name | Argument name | string | N | /// | name | Argument name | string | N |
/// | type | Argument type | string | N | /// | type | Argument type | string | N |
/// | desc | Argument description | string | Y | /// | desc | Argument description | string | Y |
/// | default | Argument default value | string | Y | /// | default | Use `Default::default` for default value | none | Y |
/// | default | Argument default value | literal | Y |
/// | default_with | Expression to generate default value | code string | Y |
/// ///
/// # Define an interface /// # Define an interface
/// ///
@ -713,12 +719,14 @@ pub use async_graphql_derive::GQLUnion;
/// ///
/// # Field argument parameters /// # Field argument parameters
/// ///
/// | Attribute | description | Type | Optional | /// | Attribute | description | Type | Optional |
/// |-------------|---------------------------|----------|----------| /// |--------------|------------------------------------------|-------------|----------|
/// | name | Argument name | string | Y | /// | name | Argument name | string | Y |
/// | desc | Argument description | string | Y | /// | desc | Argument description | string | Y |
/// | default | Argument default value | string | Y | /// | default | Use `Default::default` for default value | none | Y |
/// | validator | Input value validator | [`InputValueValidator`](validators/trait.InputValueValidator.html) | Y | /// | default | Argument default value | literal | Y |
/// | default_with | Expression to generate default value | code string | Y |
/// | validator | Input value validator | [`InputValueValidator`](validators/trait.InputValueValidator.html) | Y |
/// ///
/// # Examples /// # Examples
/// ///