strawberry-graphql / strawberry-sqlalchemy

A SQLAlchemy Integration for strawberry-graphql
MIT License
91 stars 26 forks source link

Bump strawberry-graphql from 0.209.1 to 0.217.1 #111

Closed dependabot[bot] closed 8 months ago

dependabot[bot] commented 9 months ago

Bumps strawberry-graphql from 0.209.1 to 0.217.1.

Release notes

Sourced from strawberry-graphql's releases.

🍓 0.217.1

This hotfix enables permission extensions to be used with AsyncGenerators.

Releases contributed by @​erikwrede via #3318

🍓 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) -> 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.

... (truncated)

Changelog

Sourced from strawberry-graphql's changelog.

0.217.1 - 2024-01-04

This hotfix enables permission extensions to be used with AsyncGenerators.

Contributed by Erik Wrede via [PR #3318](strawberry-graphql/strawberry#3318)

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) -> 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.

... (truncated)

Commits
  • 5b92d56 Release 🍓 0.217.1
  • ff734aa fix(permissions): hotfix for regression on permission extension w/ subscripti...
  • 6c7b11f docs: use BigInt instead of Int64 as recommendation for large integer scalars...
  • aad305b fix(docs): Connections examples and GraphQL queries are now working properly....
  • 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...
  • Additional commits viewable in compare view


Dependabot compatibility score

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 major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
codecov-commenter commented 9 months ago

Codecov Report

Merging #111 (c70e0cd) into main (ba0dceb) will decrease coverage by 0.65%. The diff coverage is n/a.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #111 +/- ## ========================================== - Coverage 84.28% 83.64% -0.65% ========================================== Files 15 15 Lines 1559 1559 Branches 256 256 ========================================== - Hits 1314 1304 -10 - Misses 192 202 +10 Partials 53 53 ```
codspeed-hq[bot] commented 9 months ago

CodSpeed Performance Report

Merging #111 will not alter performance

Comparing dependabot/pip/strawberry-graphql-0.217.1 (c70e0cd) with main (ba0dceb)

Summary

âś… 1 untouched benchmarks

dependabot[bot] commented 8 months ago

Superseded by #113.