strawberry

A GraphQL library for Python that leverages type annotations 🍓

MIT License

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

Published by botberry over 4 years ago

Update version of graphql-core to 3.1.0b2

strawberry - Strawberry 0.21.0

Published by botberry over 4 years ago

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

Usage:

# app.py
from strawberry.flask.views import GraphQLView
from your_project.schema import schema

app = Flask(__name__)

app.add_url_rule(
    "/graphql", view_func=GraphQLView.as_view("graphql_view", schema=schema)
)

if __name__ == "__main__":
    app.run(debug=True)
strawberry - Strawberry 0.20.3

Published by botberry over 4 years ago

Improve datetime, date and time types conversion. Removes aniso dependency
and also adds support for python types, so now we can do use python datetime's types
instead of our custom scalar types.

strawberry - Strawberry 0.20.2

Published by botberry almost 5 years ago

This version adds support for Django 3.0

strawberry - Strawberry 0.20.1

Published by botberry almost 5 years ago

Fix directives bugs:

  • Fix autogenerated return argument bug

  • Fix include and skip failure bug

strawberry - Strawberry 0.20.0

Published by botberry almost 5 years ago

This release improves support for permissions (it is a breaking change).
Now you will receive the source and the arguments in the has_permission method,
so you can run more complex permission checks. It also allows to use permissions
on simple fields, here's an example:

import strawberry

from strawberry.permission import BasePermission

class IsAdmin(BasePermission):
    message = "You are not authorized"

    def has_permission(self, source, info):
      return source.name.lower() == "Patrick" or _is_admin(info)


@strawberry.type
class User:
    name: str
    email: str = strawberry.field(permission_classes=[IsAdmin])


@strawberry.type
class Query:
    @strawberry.field(permission_classes=[IsAdmin])
    def user(self, info) -> str:
      return User(name="Patrick", email="[email protected]")
strawberry - Strawberry 0.19.1

Published by botberry almost 5 years ago

This releases removes support for async resolver in django
as they causes issues when accessing the databases.

strawberry - Strawberry 0.19.0

Published by botberry almost 5 years ago

This release improves support for django and asgi integration.

It allows to use async resolvers when using django. It also changes the status
code from 400 to 200 even if there are errors this makes it possible to still
use other fields even if one raised an error.

We also moved strawberry.contrib.django to strawberry.django, so if you're using
the django view make sure you update the paths.

strawberry - Strawberry 0.18.3

Published by botberry almost 5 years ago

Fix missing support for booleans when converting arguments

strawberry - Strawberry 0.18.2

Published by botberry almost 5 years ago

This releases fixes an issue when converting complex input types,
now it should support lists of complex types properly.

strawberry - Strawberry 0.18.1

Published by botberry almost 5 years ago

Set is_type_of only when the type implements an interface,
this allows to return different (but compatibile) types in simple cases.

strawberry - Strawberry 0.18.0

Published by botberry almost 5 years ago

Refactored CLI folder structure, importing click commands from a subfolder. Follows click's complex example.

strawberry - Strawberry 0.17.0

Published by botberry almost 5 years ago

Add support for custom GraphQL scalars.

strawberry - Strawberry 0.16.10

Published by botberry almost 5 years ago

Tests are now run on GitHub actions on both python 3.7 and python3.8 🐍

strawberry - Strawberry 0.16.9

Published by botberry almost 5 years ago

Fixed some typos in contributing.md .

strawberry - Strawberry 0.16.8

Published by botberry almost 5 years ago

Fixed some typos in readme.md and contributing.md.

strawberry - Strawberry 0.16.7

Published by botberry almost 5 years ago

Minimal support for registering types without fields and abstract interface querying.

strawberry - Strawberry 0.16.6

Published by botberry almost 5 years ago

Grammar fixes - changed 'corresponding tests, if tests' to 'corresponding tests. If tests' and removed extraneous period from 'Provide specific examples to demonstrate the steps..'. Also made 'Enhancement' lowercase to stay consistent with its usage in documentation and changed 'on the Strawberry' to 'to Strawberry'.

strawberry - Strawberry 0.16.5

Published by botberry about 5 years ago

Added issue template files (bug_report.md, feature_request.md, other_issues.md) and a pull request template file.

strawberry - Strawberry 0.16.4

Published by botberry about 5 years ago

Fix execution of async resolvers.

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