Open cpd67 opened 1 year ago
Hello! This PR refs #104. It adds a new get_context() method on the GraphqlWsClient which can be overridden to inject values into the context. Usage would be similar to how you add things to a Django view's context:
get_context()
GraphqlWsClient
def get_context(self): context = super().get_context() context.user = self.scope.get('user') context.other_attr = 'test' return context
Hello! This PR refs #104. It adds a new
get_context()
method on theGraphqlWsClient
which can be overridden to inject values into the context. Usage would be similar to how you add things to a Django view's context: