A GraphQL library for Python that leverages type annotations 🍓
MIT License
Published by botberry over 3 years ago
Fix for a duplicated input types error.
Published by botberry over 3 years ago
Internal codebase refactor. Clean up, consolidate, and standardize the conversion layer
between Strawberry types and GraphQL Core types; with room for further future
abstraction to support other GraphQL backends.
Published by botberry over 3 years ago
Improves typing when decorating an enum with kwargs like description and name. Adds more mypy tests.
Published by botberry almost 4 years ago
This releases fixes a wrong dependency issue
Published by botberry almost 4 years ago
Supporting multipart uploads as described here: https://github.com/jaydenseric/graphql-multipart-request-spec for ASGI.
Published by botberry almost 4 years ago
Fix Strawberry to handle multiple subscriptions at the same time
Published by botberry almost 4 years ago
Pass execution_context_class
to Schema creation
Published by botberry almost 4 years ago
Add support for converting more pydantic types
Published by botberry almost 4 years ago
This releases fixes an issue where methods marked as field were
removed from the class.
Published by botberry almost 4 years ago
Validate the schema when it is created instead of at runtime.
Published by botberry almost 4 years ago
This release adds support for strawberry.federation.field under mypy.
Published by botberry almost 4 years ago
Creation of a [debug-server]
extra, which is required to get going quickly with this project!
pip install strawberry-graphql
Will now install the primary portion of of the framework, allowing you to build your GraphQL
schema using the dataclasses pattern.
To get going quickly, you can install [debug-server]
which brings along a server which allows
you to develop your API dynamically, assuming your schema is defined in the app
module:
pip install strawberry-graphql[debug-server]
strawberry server app
Typically, in a production environment, you'd want to bring your own server :)
Published by botberry almost 4 years ago
This release fixes an issue when usign unions inside generic types, this is now
supported:
@strawberry.type
class Dog:
name: str
@strawberry.type
class Cat:
name: str
@strawberry.type
class Connection(Generic[T]):
nodes: List[T]
@strawberry.type
class Query:
connection: Connection[Union[Dog, Cat]]
Published by botberry almost 4 years ago
This releases fixes an issue with Strawberry requiring Pydantic even when not used.
Published by botberry almost 4 years ago
This release adds support for creating types from Pydantic models. Here's an
example:
import strawberry
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel
class UserModel(BaseModel):
id: int
name = 'John Doe'
signup_ts: Optional[datetime] = None
friends: List[int] = []
@strawberry.experimental.pydantic.type(model=UserModel, fields=[
'id',
'name',
'friends'
])
class UserType:
pass
Published by botberry almost 4 years ago
Add some checks to make sure the types passed to .union
are valid.
Published by botberry almost 4 years ago
Fix issue preventing reusing the same resolver for multiple fields, like here:
def get_name(self) -> str:
return "Name"
@strawberry.type
class Query:
name: str = strawberry.field(resolver=get_name)
name_2: str = strawberry.field(resolver=get_name)
Published by botberry almost 4 years ago
Another small improvement for mypy, this should prevent mypy from crashing when it can't find a type
Published by botberry almost 4 years ago
This release fixes another issue with mypy where it wasn't able to identify strawberry fields.
It also now knows that fields with resolvers aren't put in the init method of the class.
Published by botberry almost 4 years ago
This release type improves support for strawberry.field in mypy,
now we don't get Attributes without a default cannot follow attributes with one
when using strawberry.field before a type without a default.