Fix typo
This commit is contained in:
parent
fb7112a0e4
commit
c999dd26dd
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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
|
||||
/// }
|
||||
/// }
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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
|
||||
/// }
|
||||
/// }
|
||||
|
|
Loading…
Reference in New Issue
Block a user