mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-16 19:40:39 +03:00
Upgrade breaking changes from v2 to v3 as discovered by my upgrade process
parent
93d2d105ab
commit
62d77d7bf1
|
@ -207,6 +207,48 @@ schema = Schema(query=Query)
|
||||||
assert isinstance(schema.graphql_schema, GraphQLSchema)
|
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
|
### Other breaking changes
|
||||||
|
|
||||||
- Relay's `ConnectionField` and `Field` `get_resolver` function renamed to `wrap_resolve`
|
- 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
|
- 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`
|
`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!
|
A huge thanks to everyone involved in bringing this release together!
|
||||||
|
|
Loading…
Reference in New Issue
Block a user