diff --git a/docs/en/src/context.md b/docs/en/src/context.md index 2f24f448..0b338f13 100644 --- a/docs/en/src/context.md +++ b/docs/en/src/context.md @@ -121,9 +121,9 @@ impl Query { ## Selection / LookAhead -Sometimes you want to know what fields are requested in the subquery to optimize the processing of data. You can read fields accross the query with `ctx.field()` which will give you a `SelectionField` which will allow you to navigate accross the fields and subfields. +Sometimes you want to know what fields are requested in the subquery to optimize the processing of data. You can read fields across the query with `ctx.field()` which will give you a `SelectionField` which will allow you to navigate across the fields and subfields. -If you want to perform a search accross the query or the subqueries, you do not have to do this by hand with the `SelectionField`, you can use the `ctx.look_ahead()` to perform a selection +If you want to perform a search across the query or the subqueries, you do not have to do this by hand with the `SelectionField`, you can use the `ctx.look_ahead()` to perform a selection ```rust # extern crate async_graphql; diff --git a/docs/en/src/custom_directive.md b/docs/en/src/custom_directive.md index abe5f271..dcf39fc1 100644 --- a/docs/en/src/custom_directive.md +++ b/docs/en/src/custom_directive.md @@ -39,7 +39,7 @@ Register the directive when building the schema: # use async_graphql::*; # struct Query; # #[Object] -# impl Query { async fn verison(&self) -> &str { "1.0" } } +# impl Query { async fn version(&self) -> &str { "1.0" } } # struct ConcatDirective { value: String, } # #[async_trait::async_trait] # impl CustomDirective for ConcatDirective { diff --git a/docs/en/src/define_simple_object.md b/docs/en/src/define_simple_object.md index 633f20e4..64274798 100644 --- a/docs/en/src/define_simple_object.md +++ b/docs/en/src/define_simple_object.md @@ -27,7 +27,7 @@ struct MyObject { Sometimes most of the fields of a GraphQL object simply return the value of the structure member, but a few fields are calculated. In this case, the [Object](define_complex_object.html) macro cannot be used unless you hand-write all the resolvers. -The `ComplexObject` macro works in conjuction with the `SimpleObject` macro. The `SimpleObject` derive macro defines +The `ComplexObject` macro works in conjunction with the `SimpleObject` macro. The `SimpleObject` derive macro defines the non-calculated fields, where as the `ComplexObject` macro let's you write user-defined resolvers for the calculated fields. Resolvers added to `ComplexObject` adhere to the same rules as resolvers of [Object](define_complex_object.html). diff --git a/docs/en/src/derived_fields.md b/docs/en/src/derived_fields.md index 1738638d..8d870249 100644 --- a/docs/en/src/derived_fields.md +++ b/docs/en/src/derived_fields.md @@ -58,7 +58,7 @@ type Query { ## Wrapper types -A derived field won't be able to manage everythings easily: Rust's [orphan rule](https://doc.rust-lang.org/book/traits.html#rules-for-implementing-traits) requires that either the +A derived field won't be able to manage everything easily: Rust's [orphan rule](https://doc.rust-lang.org/book/traits.html#rules-for-implementing-traits) requires that either the trait or the type for which you are implementing the trait must be defined in the same crate as the impl, so the following code cannot be compiled: ```rust,ignore diff --git a/docs/zh-CN/src/custom_directive.md b/docs/zh-CN/src/custom_directive.md index 0b6cc1fe..f994a53a 100644 --- a/docs/zh-CN/src/custom_directive.md +++ b/docs/zh-CN/src/custom_directive.md @@ -38,7 +38,7 @@ fn concat(value: String) -> impl CustomDirective { # use async_graphql::*; # struct Query; # #[Object] -# impl Query { async fn verison(&self) -> &str { "1.0" } } +# impl Query { async fn version(&self) -> &str { "1.0" } } # struct ConcatDirective { value: String, } # #[async_trait::async_trait] # impl CustomDirective for ConcatDirective { diff --git a/src/http/mod.rs b/src/http/mod.rs index 9d0cb552..3b1c5b3c 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -60,7 +60,7 @@ pub async fn receive_batch_body( } } -/// Recieves a GraphQL query which is either cbor or json but NOT multipart +/// Receives a GraphQL query which is either cbor or json but NOT multipart /// This method is only to avoid recursive calls with [``receive_batch_body``] /// and [``multipart::receive_batch_multipart``] pub(super) async fn receive_batch_body_no_multipart( diff --git a/src/types/maybe_undefined.rs b/src/types/maybe_undefined.rs index 2419c463..27e05afa 100644 --- a/src/types/maybe_undefined.rs +++ b/src/types/maybe_undefined.rs @@ -509,7 +509,7 @@ mod tests { value = MaybeUndefined::Value(Ok(5)); assert_eq!(value.transpose(), Ok(MaybeUndefined::Value(5))); - value = MaybeUndefined::Value(Err("eror")); - assert_eq!(value.transpose(), Err("eror")); + value = MaybeUndefined::Value(Err("error")); + assert_eq!(value.transpose(), Err("error")); } } diff --git a/tests/simple_object.rs b/tests/simple_object.rs index 293d293b..f4f5fd8b 100644 --- a/tests/simple_object.rs +++ b/tests/simple_object.rs @@ -64,7 +64,7 @@ async fn recursive_fragment_definition() { struct Query; - // this setup is actually completely irrelevant we just need to be able ot + // this setup is actually completely irrelevant we just need to be able to // execute a query #[Object] impl Query { @@ -89,7 +89,7 @@ async fn recursive_fragment_definition_nested() { struct Query; - // this setup is actually completely irrelevant we just need to be able ot + // this setup is actually completely irrelevant we just need to be able to // execute a query #[Object] impl Query {