You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrade strawberry graphql to 0.246.2 and above (#777)
* Upgrade strawberry graphql to 0.236.0 and above
* Upgrade strawberry to above 0.246.2 and upgrade nwa-stdlib
* Change strawberry graphql to earliest failing update for debugging
- revert to old imports
- add temp log for models
* remove blocks from strawberry_models
* Fix duplicate type error in strawberry.federation.schema
The problem was that the `autoregistration` unnecessarily created a type based on the output of the `pydantic_wrapper` function, which already generates the required Strawberry type.
This led to the same Strawberry type being created twice at runtime, but from different locations:
1. Directly in the `pydantic_wrapper`, resulting in `strawberry.experimental.pydantic.object_type.YourStrawberryType`.
2. Indirectly in `autoregistration`, which created a type using the result of `pydantic_wrapper`, resulting in `orchestrator.graphql.autoregistration.YourStrawberryType`
- with the function `create_block_strawberry_type` or `create_subscription_strawberry_type`.
Previously Strawberry handled this duplication because it already needed to convert Strawberry types to GraphQL types, so we never noticed that we created the type twice.
Strawberry refactored `strawberry.federation.schema` to use Strawberry types directly (removing GraphQL type conversion) in version `0.233.0`.
This implementation does not unintentionally fix our duplicate types and resulted in the runtime error: `Union type _Entity can only include type YourStrawberryType once`.
Removing the type create in `autoregistration` fixed this problem.
* Change strawberry-graphql back to 0.246.2 or above
* Add sort_by to test_product_blocks_has_previous_page
* Bumpversion to 2.9.0rc1
0 commit comments