Open patrick91 opened 4 years ago
Being able to request info (and root) only when needed is a nice feature, but considering we haven't exposed a type for info yet, it might be nice to all to request for context as well
So, from this:
@strawberry.federation.type(extend=True) class Query: @strawberry.field def strawberry(self, info) -> str: return info.context.strawberry_repo.get_one()
to this:
@strawberry.federation.type(extend=True) class Query: @strawberry.field def strawberry(self, context: MyContextType) -> str: return context.strawberry_repo.get_one()
Ah this would be awesome! It would also solve the problem with PyCharm not autocompleting custom contextes without the mypy plugin!
Being able to request info (and root) only when needed is a nice feature, but considering we haven't exposed a type for info yet, it might be nice to all to request for context as well
So, from this:
to this:
Upvote & Fund