Skip to content

Commit dc10522

Browse files
committed
Update README.md and CHANGELOG.md to reflect the latest changes.
1 parent d42c840 commit dc10522

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2525

2626
## [1.0.0rc3] - 2023-05-02
2727

28-
- Call synchronous resolvers in the main eventloop.
29-
- Added example of middleware which offloads synchronous resolvers to
28+
- Invoke synchronous resolvers in the main thread with eventloop. So
29+
there is no difference in this aspect with async resolvers. This
30+
corresponds to the behavior of the
31+
[`graphql-core`](https://github.com/graphql-python/graphql-core)
32+
library.
33+
- Added example of middleware which offloads synchronous resolvers to
3034
the threadpool.
3135
- Fixed bug with GraphQL WrappingTypes like GraphQLNonNull causing
32-
exceptions when used as subscription field.
36+
exceptions when used as subscription field.
3337
- Fixed broken example.
3438

3539
## [1.0.0rc2] - 2023-04-28

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@ asynchronous resolvers in your code. It will work faster.
364364
### Context and scope
365365

366366
The context object (`info.context` in resolvers) is a `SimpleNamespace`
367-
instance useful to transfer extra data between GraphQL resolvers. The lifetime
368-
of `info.context` corresponds to the lifetime of GraphQL request, so it does
369-
not persist content between different queries/mutations/subscriptions. It also
370-
contains some useful extras:
367+
instance useful to transfer extra data between GraphQL resolvers. The
368+
lifetime of `info.context` corresponds to the lifetime of GraphQL
369+
request, so it does not persist content between different
370+
queries/mutations/subscriptions. It also contains some useful extras:
371371
- `graphql_operation_id`: The GraphQL operation id came from the client.
372372
- `graphql_operation_name`: The name of GraphQL operation.
373373
- `channels_scope`: [Channels scope](https://channels.readthedocs.io/en/latest/topics/consumers.html#scope).
@@ -505,14 +505,12 @@ processing. For that define `middleware` setting of your
505505
```python
506506
async def threadpool_for_sync_resolvers(next_middleware, root, info, *args, **kwds):
507507
"""Offload synchronous resolvers to the threadpool.
508-
508+
509509
This middleware should always be the last in the middlewares calls
510510
stack and the closest to the real resolver. If this middleware is
511511
not the last it will check the next middleware to call instead of
512-
real resolver.
513-
514-
The first middleware in the middlewares list will be the closest to
515-
the resolver.
512+
real resolver. The first middleware in the middlewares list will be
513+
the closest to the resolver.
516514
"""
517515
# Invoke next middleware.
518516
if asyncio.iscoroutinefunction(next_middleware):

0 commit comments

Comments
 (0)