Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 1, 2024

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 <dependency name> 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)

Updates the requirements on [strawberry-graphql[channels]](https://github.com/strawberry-graphql/strawberry) to permit the latest version.
- [Release notes](https://github.com/strawberry-graphql/strawberry/releases)
- [Changelog](https://github.com/strawberry-graphql/strawberry/blob/main/CHANGELOG.md)
- [Commits](strawberry-graphql/strawberry@0.5.6...0.217.0)

---
updated-dependencies:
- dependency-name: strawberry-graphql[channels]
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jan 1, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Feb 1, 2024

Superseded by #646.

@dependabot dependabot bot closed this Feb 1, 2024
@dependabot dependabot bot deleted the dependabot/pip/caster-back/main/strawberry-graphql-channels--lte-0.217.0 branch February 1, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants