-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Proposed Changes
Duplicate all GraphQL hierarchy objects (Schema -> Query -> Type -> Filter) to separately named V1 versions.
Justification
Because strawberry requires all objects in the GraphQL hierarchy (Schema -> Query -> Type -> Filter) to be uniquely defined, and complicated by the fact that most of the fields in Type classes are defined using strawberry.lazy which looks in specific files for resolving objects, separating V1 and V2 objects by shortcuts such as subclassing or conditional imports is not feasible. The only reasonable way to keep the V1 and V2 schemas separate within the strawberry object space is to duplicate the entire hierarchy and differentiate them with V1 suffixes, defined in duplicate files with _v1.py.
This will add extra work if GraphQL changes that need to apply to both V1 and V2 arise, but it will incentivize us to deprecate V1.
The upside of this is that when V1 is deprecated, cleaning it up will be almost entirely a matter of deleting the _v1.py files.