aiographql-client
aiographql-client copied to clipboard
Customize Payload on `CONNECTION_INIT`
Originally raised in #166 by @serializingme
Another issue I had was the need to have some extra data on the CONNECTION_INIT payload. I modified the connection_init_request in client\subscription.py:138 to add extra content to the returned dictionary:
return {
"type": GraphQLSubscriptionEventType.CONNECTION_INIT.value,
"payload": {**extra_data, "headers": {**self.request.headers}},
}