How to pass context to Schema.from_orm()? #929
Answered
by
vitalik
yshalsager
asked this question in
Q&A
-
In a Schema model that have resolver method, context can be accessed if the queryset is returned from a view function directly, but not if I serialize manually using Is there's a way to pass context while using |
Beta Was this translation helpful? Give feedback.
Answered by
vitalik
Nov 17, 2023
Replies: 1 comment 1 reply
-
Hi @yshalsager Please upgrade to latest (1.0.1) - to pass context: SomeSchema.from_orm(obj, context={'foo': 'bar'} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
yshalsager
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @yshalsager
Please upgrade to latest (1.0.1) - to pass context: