This commit is contained in:
Sunli 2020-10-22 10:11:47 +08:00
parent fb7112a0e4
commit c999dd26dd
10 changed files with 12 additions and 12 deletions

View File

@ -114,7 +114,7 @@ pub fn generate(enum_args: &args::Enum) -> GeneratorResult<TokenStream> {
if schema_enum_items.is_empty() {
return Err(Error::new_spanned(
&ident,
"An GraphQL Enum type must define one or more unique enum values.",
"A GraphQL Enum type must define one or more unique enum values.",
)
.into());
}

View File

@ -154,7 +154,7 @@ pub fn generate(object_args: &args::InputObject) -> GeneratorResult<TokenStream>
if get_fields.is_empty() {
return Err(Error::new_spanned(
&ident,
"An GraphQL Input Object type must define one or more input fields.",
"A GraphQL Input Object type must define one or more input fields.",
)
.into());
}

View File

@ -124,7 +124,7 @@ pub fn generate(interface_args: &args::Interface) -> GeneratorResult<TokenStream
if interface_args.fields.is_empty() {
return Err(Error::new_spanned(
&ident,
"An GraphQL Interface type must define one or more fields.",
"A GraphQL Interface type must define one or more fields.",
)
.into());
}

View File

@ -474,7 +474,7 @@ pub fn generate(
if resolvers.is_empty() && create_entity_types.is_empty() {
return Err(Error::new_spanned(
&self_ty,
"An GraphQL Object type must define one or more fields.",
"A GraphQL Object type must define one or more fields.",
)
.into());
}

View File

@ -132,7 +132,7 @@ pub fn generate(object_args: &args::SimpleObject) -> GeneratorResult<TokenStream
if !object_args.dummy && resolvers.is_empty() {
return Err(Error::new_spanned(
&ident,
"An GraphQL Object type must define one or more fields.",
"A GraphQL Object type must define one or more fields.",
)
.into());
}

View File

@ -367,7 +367,7 @@ pub fn generate(
if create_stream.is_empty() {
return Err(Error::new_spanned(
&self_ty,
"An GraphQL Object type must define one or more fields.",
"A GraphQL Object type must define one or more fields.",
)
.into());
}

View File

@ -19,7 +19,7 @@ use warp::{Filter, Rejection, Reply};
/// #[Object]
/// impl QueryRoot {
/// async fn value(&self) -> i32 {
/// // An GraphQL Object type must define one or more fields.
/// // A GraphQL Object type must define one or more fields.
/// 100
/// }
/// }

View File

@ -3,7 +3,7 @@
use super::*;
use async_graphql_value::Name;
/// An GraphQL file or request string defining a GraphQL service.
/// A GraphQL file or request string defining a GraphQL service.
///
/// [Reference](https://spec.graphql.org/June2018/#Document).
#[derive(Debug, Clone)]

View File

@ -470,7 +470,7 @@ where
.extensions(extensions)
}
/// Execute an GraphQL query.
/// Execute a GraphQL query.
pub async fn execute(&self, request: impl Into<Request>) -> Response {
let request = request.into();
match self.prepare_request(request).await {
@ -482,7 +482,7 @@ where
}
}
/// Execute an GraphQL batch query.
/// Execute a GraphQL batch query.
pub async fn execute_batch(&self, batch_request: BatchRequest) -> BatchResponse {
match batch_request {
BatchRequest::Single(request) => BatchResponse::Single(self.execute(request).await),
@ -565,7 +565,7 @@ where
}
}
/// Execute an GraphQL subscription.
/// Execute a GraphQL subscription.
pub fn execute_stream(
&self,
request: impl Into<Request>,

View File

@ -21,7 +21,7 @@ use crate::{
/// #[Object]
/// impl QueryRoot {
/// async fn value(&self) -> i32 {
/// // An GraphQL Object type must define one or more fields.
/// // A GraphQL Object type must define one or more fields.
/// 100
/// }
/// }