DSL how to select fields which are Python reserved keywords
FrankC01 opened this issue · 2 comments
FrankC01 commented
Here is the problem I face, I can create this using document node:
""" nodes {
name
isEntry
visibility
return {
signature
}
"""
(lines omitted)
However I would like to create a DSL fragment but return
fails Python (i.e. Outer.return.select(...)
Is there a way to inject a partial DocumentNode into a DocementNode generated from dsl_gql
?
leszekhanusz commented
You could use either:
getattr(Outer, "return").select(...)
Outer.__getattr__("return").select(...)
FrankC01 commented
Works like a charm, exactley what I needed.
Kudos!!!