resolved typo.
Signed-off-by: Peter Rong <PeterRong96@gmail.com>
This commit is contained in:
parent
b5c8e80151
commit
f5ce459e51
|
@ -1,6 +1,6 @@
|
|||
# Context
|
||||
|
||||
The main goal of `Context` is to acquire global data attached to Schema. **Note that if the return value of your Resulve boored data in `Context`, you need to explictly state the lifetime of the argument.**
|
||||
The main goal of `Context` is to acquire global data attached to Schema. **Note that if the return value of resolve function is borrowed from `Context`, you need to explictly state the lifetime of the argument.**
|
||||
|
||||
The following example shows how to borrow data in `Context`.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
It's easy to define an `Enum`, here we have an example:
|
||||
|
||||
**Async-graphql can automatically change the name of each item to GraphQL's convsion (all capitals and underscores), you can also use `name` to rename.**
|
||||
**Async-graphql can automatically change the name of each item to GraphQL's CONSTANT_CASE convension, you can also use `name` to rename.**
|
||||
|
||||
```rust
|
||||
use async_graphql::*;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<!--Input Object and SimpleObject inconsistant space.-->
|
||||
You can define an `Object` as argument, GraphQL calls it `InputObject`.
|
||||
The definition of `InputObject` is similar to [SimpleObject](define_simple_object.md).
|
||||
However, `InputObject` can only be used for output and `SimpleObject` can only be used as input.
|
||||
However, `SimpleObject` can only be used for output and `InputObject` can only be used as input.
|
||||
|
||||
`InputObject` don't need a `#[field]` for each field, every field is `InputValue`.
|
||||
But you can add optional `#[field]` to add description or rename the field.
|
||||
|
|
Loading…
Reference in New Issue
Block a user