async-graphql/src/schema/input_value.rs

33 lines
1.0 KiB
Rust
Raw Normal View History

2020-03-02 00:24:49 +00:00
use crate::schema::__Type;
2020-03-02 11:25:21 +00:00
use crate::{ContextField, Result};
2020-03-02 00:24:49 +00:00
use async_graphql_derive::Object;
2020-03-02 11:25:21 +00:00
#[Object(
internal,
desc = "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",
field(name = "name", type = "String", owned),
field(name = "description", type = "Option<String>", owned),
field(name = "type", resolver = "ty", type = "__Type", owned),
field(name = "defaultValue", type = "String", owned)
)]
pub struct __InputValue {}
2020-03-02 00:24:49 +00:00
2020-03-02 11:25:21 +00:00
#[async_trait::async_trait]
impl __InputValueFields for __InputValue {
async fn name(&self, _: &ContextField<'_>) -> Result<String> {
todo!()
}
2020-03-02 00:24:49 +00:00
2020-03-02 11:25:21 +00:00
async fn description(&self, _: &ContextField<'_>) -> Result<Option<String>> {
todo!()
}
2020-03-02 00:24:49 +00:00
2020-03-02 11:25:21 +00:00
async fn ty(&self, _: &ContextField<'_>) -> Result<__Type> {
todo!()
}
async fn default_value(&self, _: &ContextField<'_>) -> Result<String> {
todo!()
}
2020-03-02 00:24:49 +00:00
}