This errors occurs when adding this extension: QueryDepthLimiter in the schema:
tearDown
...
File "/usr/local/lib/python3.9/copy.py", line 161, in deepcopy
rv = reductor(4)
File "/usr/local/lib/python3.9/site-packages/django/urls/resolvers.py", line 94, in __reduce_ex__
raise PicklingError(f"Cannot pickle {self.__class__.__qualname__}.")
_pickle.PicklingError: Cannot pickle ResolverMatch.
import strawberry
from strawberry.extensions import QueryDepthLimiter
schema = strawberry.Schema(
query=Query,
mutation=Mutation,
extensions=[
QueryDepthLimiter(max_depth=10)
],
)
class BaseTestCase(TestCase):
@classmethod
def setUpTestData(cls):
super().setUpTestData()
cls._client = APIClient(schema=schema)
def tearDown(self):
self._client.logout()
is this a known issue?
with thanks
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too