Skip to content

Conversation

cpd67
Copy link

@cpd67 cpd67 commented Aug 15, 2023

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:

def get_context(self):
    context = super().get_context()
    context.user = self.scope.get('user')
    context.other_attr = 'test'
    return context

@cpd67 cpd67 force-pushed the master branch 4 times, most recently from e74836d to b963595 Compare August 15, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant