@@ -79,16 +79,16 @@ pub fn derive_scalar_value_internal(input: TokenStream) -> TokenStream {
79
79
The `impl_object` proc macro is the primary way of defining GraphQL resolvers
80
80
that can not be implemented with the GraphQLObject derive.
81
81
82
- It enables you to write GraphQL field resolvers for a type by declaring a
82
+ It enables you to write GraphQL field resolvers for a type by declaring a
83
83
regular Rust `impl` block. Under the hood, the procedural macro implements
84
84
the GraphQLType trait.
85
85
86
- `impl_object` comes with many features that allow customization of
86
+ `impl_object` comes with many features that allow customization of
87
87
your fields, all of which are detailed below.
88
88
89
89
### Getting Started
90
90
91
- This simple example will show you the most basic use of `impl_object`.
91
+ This simple example will show you the most basic use of `impl_object`.
92
92
More advanced use cases are introduced step by step.
93
93
94
94
```
@@ -105,17 +105,17 @@ impl Query {
105
105
106
106
107
107
// This defines a simple, static field which does not require any context.
108
- // You can return any value that implements the `GraphQLType` trait.
108
+ // You can return any value that implements the `GraphQLType` trait.
109
109
// This trait is implemented for:
110
110
// - basic scalar types like bool, &str, String, i32, f64
111
111
// - GraphQL compatible wrappers like Option<_>, Vec<_>.
112
112
// - types which use the `#derive[juniper::GraphQLObject]`
113
113
// - `impl_object` structs.
114
- //
115
- // An important note regarding naming:
114
+ //
115
+ // An important note regarding naming:
116
116
// By default, field names will be converted to camel case.
117
117
// For your GraphQL queries, the field will be available as `apiVersion`.
118
- //
118
+ //
119
119
// You can also manually customize the field name if required. (See below)
120
120
fn api_version() -> &'static str {
121
121
"0.1"
@@ -169,7 +169,7 @@ You can specify a context that will be available across
169
169
all your resolvers during query execution.
170
170
171
171
The Context can be injected into your resolvers by just
172
- specifying an argument with the same type as the context
172
+ specifying an argument with the same type as the context
173
173
(but as a reference).
174
174
175
175
```
@@ -198,11 +198,11 @@ impl Query {
198
198
context.db.user(id)
199
199
}
200
200
201
- // You can also gain access to the executor, which
201
+ // You can also gain access to the executor, which
202
202
// allows you to do look aheads.
203
203
fn with_executor(executor: &Executor) -> bool {
204
204
let info = executor.look_ahead();
205
- // ...
205
+ // ...
206
206
true
207
207
}
208
208
}
0 commit comments