Skip to content

Commit

Permalink
✨ feat: strawberry extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Matheus-Doreto committed Dec 13, 2023
1 parent 1c6ab62 commit 19f4bcf
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 202 deletions.
2 changes: 2 additions & 0 deletions graphemy/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(
context_getter=None,
permission_getter=None,
engine=None,
extensions=[],
**kwargs,
):
functions = []
Expand Down Expand Up @@ -126,6 +127,7 @@ async def get_context(request: Request) -> dict:
schema = strawberry.Schema(
query=strawberry.type(query),
mutation=strawberry.type(mutation) if mutation else None,
extensions=extensions,
)
super().__init__(schema=schema, context_getter=get_context, **kwargs)

Expand Down
Loading

0 comments on commit 19f4bcf

Please sign in to comment.