strawberry

A GraphQL library for Python that leverages type annotations 🍓

MIT License

Downloads
1.1M
Stars
3.8K
Committers
260
strawberry - Strawberry 0.44.11

Published by botberry over 3 years ago

Fix for a duplicated input types error.

strawberry - Strawberry 0.44.10

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.

strawberry - Strawberry 0.44.9

Published by botberry over 3 years ago

Improves typing when decorating an enum with kwargs like description and name. Adds more mypy tests.

strawberry - Strawberry 0.44.8

Published by botberry almost 4 years ago

This releases fixes a wrong dependency issue

strawberry - Strawberry 0.44.7

Published by botberry almost 4 years ago

Supporting multipart uploads as described here: https://github.com/jaydenseric/graphql-multipart-request-spec for ASGI.

strawberry - Strawberry 0.44.6

Published by botberry almost 4 years ago

Fix Strawberry to handle multiple subscriptions at the same time

strawberry - Strawberry 0.44.5

Published by botberry almost 4 years ago

Pass execution_context_class to Schema creation

strawberry - Strawberry 0.44.4

Published by botberry almost 4 years ago

Add support for converting more pydantic types

  • pydantic.EmailStr
  • pydantic.AnyUrl
  • pydantic.AnyHttpUrl
  • pydantic.HttpUrl
  • pydantic.PostgresDsn
  • pydantic.RedisDsn
strawberry - Strawberry 0.44.3

Published by botberry almost 4 years ago

This releases fixes an issue where methods marked as field were
removed from the class.

strawberry - Strawberry 0.44.2

Published by botberry almost 4 years ago

Validate the schema when it is created instead of at runtime.

strawberry - Strawberry 0.44.1

Published by botberry almost 4 years ago

This release adds support for strawberry.federation.field under mypy.

strawberry - Strawberry 0.44.0

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 :)

strawberry - Strawberry 0.43.2

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]]
strawberry - Strawberry 0.43.1

Published by botberry almost 4 years ago

This releases fixes an issue with Strawberry requiring Pydantic even when not used.

strawberry - Strawberry 0.43.0

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
strawberry - Strawberry 0.42.7

Published by botberry almost 4 years ago

Add some checks to make sure the types passed to .union are valid.

strawberry - Strawberry 0.42.6

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)
strawberry - Strawberry 0.42.5

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

strawberry - Strawberry 0.42.4

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.

strawberry - Strawberry 0.42.3

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.

Package Rankings
Top 1.15% on Pypi.org
Top 16.1% on Conda-forge.org
Badges
Extracted from project README
CircleCI Discord PyPI
Related Projects