Skip to content

Strawberry 0.14.0

Compare
Choose a tag to compare
@botberry botberry released this 14 Aug 19:42
· 3126 commits to main since this release

Added support for defining query directives, example:

import strawberry
from strawberry.directives import DirectiveLocation

@strawberry.type
class Query:
    cake: str = "made_in_switzerland"

@strawberry.directive(
    locations=[DirectiveLocation.FIELD], description="Make string uppercase"
)
def uppercase(value: str, example: str):
    return value.upper()

schema = strawberry.Schema(query=Query, directives=[uppercase])