From 62d77d7bf1f944587c17d2120db689fbd6fac76e Mon Sep 17 00:00:00 2001 From: DrJfrost Date: Tue, 27 Aug 2024 23:10:19 -0500 Subject: [PATCH] Upgrade breaking changes from v2 to v3 as discovered by my upgrade process --- v3-release-notes.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/v3-release-notes.md b/v3-release-notes.md index 9811284..a0537b5 100644 --- a/v3-release-notes.md +++ b/v3-release-notes.md @@ -207,6 +207,48 @@ schema = Schema(query=Query) assert isinstance(schema.graphql_schema, GraphQLSchema) ``` +### `Field` class no longer needs to set the `type` keyword: + +Before: + +```python3 +permissions = Field( + type=SubmittedContentReadPermissions, + description="Query the permissions...", + ) +``` +After: + +```python3 +permissions = Field( + SubmittedContentReadPermissions, + description="Query the permissions...", + ) +``` + +### Scalars no longer support tuples for the description in favor of `string` type values: + +Before: + +```python3 +search=String( + description=( + "Fuzzy filter of Time...", + "Worker FullName...", + ), + required=False, + ) +``` + +After: + +```python3 +search=String( + description="Fuzzy filter of Time...", + required=False, + ) +``` + ### Other breaking changes - Relay's `ConnectionField` and `Field` `get_resolver` function renamed to `wrap_resolve` @@ -214,6 +256,9 @@ assert isinstance(schema.graphql_schema, GraphQLSchema) - Relay's function `from graphene.relay.node import to_global_id` now raises error `cannot import name 'to_global_id' from 'graphene.relay.node'` and must be updated to `from graphql_relay import to_global_id` + + + --- A huge thanks to everyone involved in bringing this release together!