Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 880 Bytes

File metadata and controls

60 lines (43 loc) · 880 Bytes
title summary tags
Extension Name
A summary of the extension.
comma,separated,list,of,tags

ExtensionName

This extension does ...

Usage example:

import strawberry
from strawberry.extensions import ExtensionName


@strawberry.type
class Query:
    @strawberry.field
    def hello(self) -> str:
        return "Hello, world!"


schema = strawberry.Schema(
    Query,
    extensions=[
        ExtensionName(),
    ],
)

API reference:

class ExtensionName(an_argument=None): ...

an_argument: Optional[str] = None

Description of the argument.

More examples:

Using `an_argument`
import strawberry
from strawberry.extensions import ValidationCache

schema = strawberry.Schema(
    Query,
    extensions=[
        ExtensionName(an_argument="something"),
    ],
)