Gencaster / gencaster

A non-linear audio streaming framework for real-time radiophonic experiences and live music.
https://gencaster.org
GNU Affero General Public License v3.0
20 stars 0 forks source link

Update strawberry-graphql[channels] requirement from <=0.208.2 to <=0.217.0 in /caster-back #642

Closed dependabot[bot] closed 9 months ago

dependabot[bot] commented 10 months ago

Updates the requirements on strawberry-graphql[channels] to permit the latest version.

Release notes

Sourced from strawberry-graphql[channels]'s releases.

🍓 0.217.0

Permissions classes now use a FieldExtension. The new preferred way to add permissions is to use the PermissionsExtension class:

import strawberry
from strawberry.permission import PermissionExtension, BasePermission

class IsAuthorized(BasePermission): message = "User is not authorized" error_extensions = {"code": "UNAUTHORIZED"}

def has_permission(self, source, info, **kwargs) -&gt; bool:
    return False

@​strawberry.type class Query: @​strawberry.field(extensions=[PermissionExtension(permissions=[IsAuthorized()])]) def name(self) -> str: return "ABC"

The old way of adding permissions using permission_classes is still supported via the automatic addition of a PermissionExtension on the field.

Using the new PermissionExtension API, permissions support even more features:

Silent errors

To return None or [] instead of raising an error, the fail_silently keyword argument on PermissionExtension can be set to True.

Custom Error Extensions & classes

Permissions will now automatically add pre-defined error extensions to the error, and can use a custom GraphQLError class. This can be configured by modifying the error_class and error_extensions attributes on the BasePermission class.

Customizable Error Handling

To customize the error handling, the on_unauthorized method on the BasePermission class can be used. Further changes can be implemented by subclassing the PermissionExtension class.

Schema Directives

Permissions will automatically be added as schema directives to the schema. This behavior can be altered by setting the add_directives to False

... (truncated)

Changelog

Sourced from strawberry-graphql[channels]'s changelog.

0.217.0 - 2023-12-18

Permissions classes now use a FieldExtension. The new preferred way to add permissions is to use the PermissionsExtension class:

import strawberry
from strawberry.permission import PermissionExtension, BasePermission

class IsAuthorized(BasePermission): message = "User is not authorized" error_extensions = {"code": "UNAUTHORIZED"}

def has_permission(self, source, info, **kwargs) -&gt; bool:
    return False

@​strawberry.type class Query: @​strawberry.field(extensions=[PermissionExtension(permissions=[IsAuthorized()])]) def name(self) -> str: return "ABC"

The old way of adding permissions using permission_classes is still supported via the automatic addition of a PermissionExtension on the field.

Using the new PermissionExtension API, permissions support even more features:

Silent errors

To return None or [] instead of raising an error, the fail_silently keyword argument on PermissionExtension can be set to True.

Custom Error Extensions & classes

Permissions will now automatically add pre-defined error extensions to the error, and can use a custom GraphQLError class. This can be configured by modifying the error_class and error_extensions attributes on the BasePermission class.

Customizable Error Handling

To customize the error handling, the on_unauthorized method on the BasePermission class can be used. Further changes can be implemented by subclassing the PermissionExtension class.

Schema Directives

... (truncated)

Commits
  • 528b1b3 Release 🍓 0.217.0
  • 599e3a3 refactor: Permissions using Field Extensions (#2570)
  • 5b5b717 Release 🍓 0.216.1
  • a31b5c4 fix: relay.Node with overwritten resolve_id and without NodeId (#2844)
  • 6b84220 Release 🍓 0.216.0
  • 75cb9ec Override encode_json() method in Django BaseView to use DjangoJSONEncoder (#3...
  • 3c7b57d Release 🍓 0.215.3
  • fdb87ec change: parse query params to use parse_json (#3272)
  • f0332fc Release 🍓 0.215.2
  • 3e5c7f6 Allow to send cookies with apollo sandbox (#3278)
  • Additional commits viewable in compare view


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 9 months ago

Superseded by #646.