strawberry

A GraphQL library for Python that leverages type annotations 🍓

MIT License

Downloads
1.1M
Stars
3.8K
Committers
260
strawberry - 🍓 0.70.1

Published by botberry about 3 years ago

Switch CDN used to load GraphQLi dependencies from jsdelivr.com to unpkg.com

strawberry - 🍓 0.70.0

Published by botberry over 3 years ago

This release adds support for disabling auto camel casing. It
does so by introducing a new configuration parameter to the schema.

You can use it like so:

@strawberry.type
class Query:
    example_field: str = "Example"

schema = strawberry.Schema(
    query=Query, config=StrawberryConfig(auto_camel_case=False)
)
strawberry - 🍓 0.69.4

Published by botberry over 3 years ago

Fix for regression when defining inherited types with explicit fields.

strawberry - 🍓 0.69.3

Published by botberry over 3 years ago

This releases improves the MyPy plugin to be more forgiving of
settings like follow_imports = skip which would break the type checking.

This is a continuation of the previous release and fixes for type checking issues.

strawberry - 🍓 0.69.2

Published by botberry over 3 years ago

This releases improves the MyPy plugin to be more forgiving of
settings like follow_imports = skip which would break the
type checking.

strawberry - 🍓 0.69.1

Published by botberry over 3 years ago

This release removes a TypeGuard import to prevent errors
when using older versions of typing_extensions.

strawberry - 🍓 0.69.0

Published by botberry over 3 years ago

Refactor of the library's typing internals. Previously, typing was handled
individually by fields, arguments, and objects with a hodgepodge of functions to tie it
together. This change creates a unified typing system that the object, fields, and
arguments each hook into.

Mainly replaces the attributes that were stored on StrawberryArgument and
StrawberryField with a hierarchy of StrawberryTypes.

Introduces StrawberryAnnotation, as well as StrawberryType and some subclasses,
including StrawberryList, StrawberryOptional, and StrawberryTypeVar.

This is a breaking change if you were calling the constructor for StrawberryField,
StrawberryArgument, etc. and using arguments such as is_optional or child.

@strawberry.field no longer takes an argument called type_. It instead takes a
StrawberryAnnotation called type_annotation.

strawberry - 🍓 0.68.4

Published by botberry over 3 years ago

This release fixes an issue with the federation printer that
prevented using federation directives with types that were
implementing interfaces.

This is now allowed:

@strawberry.interface
class SomeInterface:
    id: strawberry.ID

@strawberry.federation.type(keys=["upc"], extend=True)
class Product(SomeInterface):
    upc: str = strawberry.federation.field(external=True)
strawberry - 🍓 0.68.3

Published by botberry over 3 years ago

This release changes our graphiql.html template to use a specific version of js-cookie
to prevent a JavaScript error, see:

https://github.com/js-cookie/js-cookie/issues/698

strawberry - 🍓 0.68.2

Published by botberry over 3 years ago

This release fixes a regression that broke strawberry-graphql-django.

Field.get_results now always receives the info argument.

strawberry - 🍓 0.68.1

Published by botberry over 3 years ago

This release only changes some internal code to make future improvements
easier.

strawberry - 🍓 0.68.0

Published by botberry over 3 years ago

Matching the behaviour of graphql-core, passing an incorrect ISO string value for a Time, Date or DateTime scalar now raises a GraphQLError instead of the original parsing error.

The GraphQLError will include the error message raised by the string parser, e.g. Value cannot represent a DateTime: "2021-13-01T09:00:00". month must be in 1..12

strawberry - 🍓 0.67.1

Published by botberry over 3 years ago

Fixes #1022 by making starlette an optional dependency.

strawberry - 🍓 0.67.0

Published by botberry over 3 years ago

Add ability to specific the graphql name for a resolver argument. E.g.,

from typing import Annotated
import strawberry


@strawberry.input
class HelloInput:
    name: str = "world"


@strawberry.type
class Query:
    @strawberry.field
    def hello(
        self,
        input_: Annotated[HelloInput, strawberry.argument(name="input")]
    ) -> str:
        return f"Hi {input_.name}"
strawberry - 🍓 0.66.0

Published by botberry over 3 years ago

This release fixes a bug that was preventing the use of an enum member as the
default value for an argument.

For example:

@strawberry.enum
class IceCreamFlavour(Enum):
    VANILLA = "vanilla"
    STRAWBERRY = "strawberry"
    CHOCOLATE = "chocolate"
    PISTACHIO = "pistachio"

@strawberry.mutation
def create_flavour(
    self, flavour: IceCreamFlavour = IceCreamFlavour.STRAWBERRY
) -> str:
    return f"{flavour.name}"
strawberry - 🍓 0.65.5

Published by botberry over 3 years ago

This release reverts the changes made in v0.65.4 that caused an issue leading to
circular imports when using the strawberry-graphql-django extension package.

strawberry - 🍓 0.65.4

Published by botberry over 3 years ago

This release fixes the IDE integration where package strawberry.django could not be find by some editors like vscode.

strawberry - 🍓 0.65.3

Published by botberry over 3 years ago

This release fixes the ASGI subscription implementation by handling disconnecting clients properly.

Additionally, the ASGI implementation has been internally refactored to match the AIOHTTP implementation.

strawberry - 🍓 0.65.2

Published by botberry over 3 years ago

This release fixes a bug in the subscription implementations that prevented clients
from selecting one of multiple subscription operations from a query. Client sent
messages like the following one are now handled as expected.

{
  "type": "GQL_START",
  "id": "DEMO",
  "payload": {
    "query": "subscription Sub1 { sub1 } subscription Sub2 { sub2 }",
    "operationName": "Sub2"
  }
}
strawberry - 🍓 0.65.1

Published by botberry over 3 years ago

This release fixes the upload of nested file lists. Among other use cases, having an
input type like shown below is now working properly.

import typing
import strawberry
from strawberry.file_uploads import Upload


@strawberry.input
class FolderInput:
    files: typing.List[Upload]
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