Ref.: https://strawberry.rocks/docs/integrations/sanic#get_context
I am trying to set cookies in the response as shown here:
https://strawberry.rocks/docs/integrations/asgi#setting-response-headers
class MyGraphQLView(GraphQLView):
async def get_context(self, request: Request, response: Response) -> Any:
return {"request": request, "response": response}
app = Sanic("api")
app.add_route(SanicGraphQLView.as_view(schema=schema, graphiql=True), "/graphql")
and I am getting an error when setting the cookie because the context contains a TemporalResponse instead of a Sanic HTTPResponse object.
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