strawberry
strawberry copied to clipboard
A GraphQL library for Python that leverages type annotations 🍓
## Describe the Bug The `strawberry.field` method conveniently has a generic overload such that the return type of the `field` method is the return type of the passed function. However,...
## Description Python's `typing.Annotated` is a handy way of appending misc info into a field, argument, etc. In fact, Strawberry uses it in a few places, like `strawberry.Private` and `strawberry.argument`....
## Describe the Bug Generic types follow a naming convention of prepending the variable name to the type name. But when the variable is a builtin scalar, it's using the...
This PR refactors the HTTP tests to remove code duplication. Working on this PR also surfaced some inconsistencies and missing features between the integrations. To make this PR I created...
## Feature Request Type - [ ] Core functionality - [ ] Alteration (enhancement/optimization) of existing feature(s) - [x] New behavior ## Description It would be useful for people to...
If pydantic model contains Enum field this enum definition is not registered in GraphQL Schema Running following code raises error: ```python import typing from enum import Enum import strawberry from...
This commit improves the performance of type resolution when returning interface types from a resolver by defining [`resolve_type`](https://github.com/strawberry-graphql/strawberry/pull/1949) that is called once per item. Without the existence of `resolve_type` the...
I cannot get query if I use uvicorn (got `INFO: 127.0.0.1:40288 - "OPTIONS /graphql HTTP/1.1" 405 Method Not Allowed`. If I start by `strawberry server main` — it's ok. main.py:...
Currently directives only act as "tags", ideally they would support custom functionality. For example, we'd like to check that a specific request header is set when calling mutations with a...