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() {
|
if schema_enum_items.is_empty() {
|
||||||
return Err(Error::new_spanned(
|
return Err(Error::new_spanned(
|
||||||
&ident,
|
&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());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ pub fn generate(object_args: &args::InputObject) -> GeneratorResult<TokenStream>
|
||||||
if get_fields.is_empty() {
|
if get_fields.is_empty() {
|
||||||
return Err(Error::new_spanned(
|
return Err(Error::new_spanned(
|
||||||
&ident,
|
&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());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ pub fn generate(interface_args: &args::Interface) -> GeneratorResult<TokenStream
|
||||||
if interface_args.fields.is_empty() {
|
if interface_args.fields.is_empty() {
|
||||||
return Err(Error::new_spanned(
|
return Err(Error::new_spanned(
|
||||||
&ident,
|
&ident,
|
||||||
"An GraphQL Interface type must define one or more fields.",
|
"A GraphQL Interface type must define one or more fields.",
|
||||||
)
|
)
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
|
@ -474,7 +474,7 @@ pub fn generate(
|
||||||
if resolvers.is_empty() && create_entity_types.is_empty() {
|
if resolvers.is_empty() && create_entity_types.is_empty() {
|
||||||
return Err(Error::new_spanned(
|
return Err(Error::new_spanned(
|
||||||
&self_ty,
|
&self_ty,
|
||||||
"An GraphQL Object type must define one or more fields.",
|
"A GraphQL Object type must define one or more fields.",
|
||||||
)
|
)
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ pub fn generate(object_args: &args::SimpleObject) -> GeneratorResult<TokenStream
|
||||||
if !object_args.dummy && resolvers.is_empty() {
|
if !object_args.dummy && resolvers.is_empty() {
|
||||||
return Err(Error::new_spanned(
|
return Err(Error::new_spanned(
|
||||||
&ident,
|
&ident,
|
||||||
"An GraphQL Object type must define one or more fields.",
|
"A GraphQL Object type must define one or more fields.",
|
||||||
)
|
)
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,7 +367,7 @@ pub fn generate(
|
||||||
if create_stream.is_empty() {
|
if create_stream.is_empty() {
|
||||||
return Err(Error::new_spanned(
|
return Err(Error::new_spanned(
|
||||||
&self_ty,
|
&self_ty,
|
||||||
"An GraphQL Object type must define one or more fields.",
|
"A GraphQL Object type must define one or more fields.",
|
||||||
)
|
)
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ use warp::{Filter, Rejection, Reply};
|
||||||
/// #[Object]
|
/// #[Object]
|
||||||
/// impl QueryRoot {
|
/// impl QueryRoot {
|
||||||
/// async fn value(&self) -> i32 {
|
/// 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
|
/// 100
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
use super::*;
|
use super::*;
|
||||||
use async_graphql_value::Name;
|
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).
|
/// [Reference](https://spec.graphql.org/June2018/#Document).
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
|
@ -470,7 +470,7 @@ where
|
||||||
.extensions(extensions)
|
.extensions(extensions)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Execute an GraphQL query.
|
/// Execute a GraphQL query.
|
||||||
pub async fn execute(&self, request: impl Into<Request>) -> Response {
|
pub async fn execute(&self, request: impl Into<Request>) -> Response {
|
||||||
let request = request.into();
|
let request = request.into();
|
||||||
match self.prepare_request(request).await {
|
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 {
|
pub async fn execute_batch(&self, batch_request: BatchRequest) -> BatchResponse {
|
||||||
match batch_request {
|
match batch_request {
|
||||||
BatchRequest::Single(request) => BatchResponse::Single(self.execute(request).await),
|
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(
|
pub fn execute_stream(
|
||||||
&self,
|
&self,
|
||||||
request: impl Into<Request>,
|
request: impl Into<Request>,
|
||||||
|
|
|
@ -21,7 +21,7 @@ use crate::{
|
||||||
/// #[Object]
|
/// #[Object]
|
||||||
/// impl QueryRoot {
|
/// impl QueryRoot {
|
||||||
/// async fn value(&self) -> i32 {
|
/// 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
|
/// 100
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user