strawberry

A GraphQL library for Python that leverages type annotations 🍓

MIT License

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

Published by botberry about 5 years ago

Typo fix - changed the spelling from 'follwing' to 'following'.

strawberry - Strawberry 0.16.2

Published by botberry about 5 years ago

Updated docs to provide reference on how to use Django view.

strawberry - Strawberry 0.16.1

Published by botberry about 5 years ago

Removed custom representation for Strawberry types,
this should make using types much nicer.

strawberry - Strawberry 0.16.0

Published by botberry about 5 years ago

Switched from graphql-core-next dependency to graphql-core@^3.0.0a0.

strawberry - Strawberry 0.15.6

Published by botberry about 5 years ago

Fixes MYPY plugin

strawberry - Strawberry 0.15.5

Published by botberry about 5 years ago

Add the flake8-bugbear linting plugin to catch likely bugs

strawberry - Strawberry 0.15.4

Published by botberry about 5 years ago

Fixed conversion of enum when value was falsy.

strawberry - Strawberry 0.15.3

Published by botberry about 5 years ago

Fixed issue when trying to convert optional arguments to a type

strawberry - Strawberry 0.15.2

Published by botberry about 5 years ago

Fix issue with converting arguments with optional fields.

Thanks to @sciyoshi for the fix!

strawberry - Strawberry 0.15.1

Published by botberry about 5 years ago

Added a Django view that allows you to query the schema and interact with it via GraphQL playground.

Usage:


# Install
$ pip install strawberry-graphql[django]

# settings.py
INSTALLED_APPS = [
    ...
    'strawberry.contrib.django',
]

# urls.py
from strawberry.contrib.django.views import GraphQLView
from your_project.schema import schema

urlpatterns = [
    path('graphql/', GraphQLView.as_view(schema=schema)),
]

strawberry - Strawberry 0.15.0

Published by botberry about 5 years ago

This release doesn't add any feature or fixes, but it fixes an issue with
checking for release files when submitting PRs ✨.

strawberry - Strawberry 0.14.4

Published by botberry about 5 years ago

Fixes the conversion of Enums in resolvers, arguments and input types.

strawberry - Strawberry 0.14.3

Published by botberry about 5 years ago

Add a mypy plugin that enables typechecking Strawberry types

strawberry - Strawberry 0.14.2

Published by botberry about 5 years ago

Fix List types being converted to Optional GraphQL lists.

strawberry - Strawberry 0.14.1

Published by botberry about 5 years ago

This release doesn't add any feature or fixes, it only introduces a GitHub
Action to let people know how to add a RELEASE.md file when submitting a PR.

strawberry - Strawberry 0.14.0

Published by botberry about 5 years ago

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])
strawberry - Strawberry 0.13.4

Published by botberry about 5 years ago

Improve dict_to_type conversion by checking if the field has a different name or case

strawberry - Strawberry 0.13.3

Published by botberry over 5 years ago

Fix field initialization not allowed when using strawberry.field in an input type

@strawberry.input
class Say:
    what = strawberry.field(is_input=True)
strawberry - Strawberry 0.13.2

Published by botberry over 5 years ago

Allow the usage of Union types in the mutations

@strawberry.type
class A:
    x: int

@strawberry.type
class B:
    y: int

@strawberry.type
class Mutation:
    @strawberry.mutation
    def hello(self, info) -> Union[A, B]:
        return B(y=5)

schema = strawberry.Schema(query=A, mutation=Mutation)

query = """
mutation {
    hello {
        __typename

        ... on A {
            x
        }

        ... on B {
            y
        }
    }
}
"""
strawberry - Strawberry 0.13.1

Published by botberry over 5 years ago

Fix missing fields when extending a class, now we can do this:

@strawberry.type
class Parent:
    cheese: str = "swiss"

    @strawberry.field
    def friend(self, info) -> str:
        return 'food'

@strawberry.type
class Schema(Parent):
    cake: str = "made_in_swiss"
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