Open strue36 opened 2 years ago
For a GraphQL operation that uses a non-scalar input type, a pydantic model is created.
AIOHttpLink passes this model to self._session.post() which uses the default json encoder. This fails to serialize the pydantic model.
payload["variables"] = operation.variables post_kwargs = {"json": payload} async with self._session.post( self.url, headers=operation.context.headers, **post_kwargs ) as response:
elif json is not None: data = payload.JsonPayload(json, dumps=self._json_serialize)
I have created a pull request with an extended JSONEncoder which is used to handle these objects.
For a GraphQL operation that uses a non-scalar input type, a pydantic model is created.
AIOHttpLink passes this model to self._session.post() which uses the default json encoder. This fails to serialize the pydantic model.
Building payload
Calls this which uses the default JSONEncoder
I have created a pull request with an extended JSONEncoder which is used to handle these objects.