Skip to content

Update strawberry-graphql[channels] requirement from <=0.177.0 to <=0.178.0 in /caster-back#432

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/pip/caster-back/main/strawberry-graphql-channels--lte-0.178.0
Closed

Update strawberry-graphql[channels] requirement from <=0.177.0 to <=0.178.0 in /caster-back#432
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/pip/caster-back/main/strawberry-graphql-channels--lte-0.178.0

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 29, 2023

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

Release notes

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

🍓 0.178.0

This release introduces the new should_ignore argument to the QueryDepthLimiter extension that provides a more general and more verbose way of specifying the rules by which a query's depth should be limited.

The should_ignore argument should be a function that accepts a single argument of type IgnoreContext. The IgnoreContext class has the following attributes:

  • field_name of type str: the name of the field to be compared against
  • field_args of type strawberry.extensions.query_depth_limiter.FieldArgumentsType: the arguments of the field to be compared against
  • query of type graphql.language.Node: the query string
  • context of type graphql.validation.ValidationContext: the context passed to the query and returns True if the field should be ignored and False otherwise. This argument is injected, regardless of name, by the QueryDepthLimiter class and should not be passed by the user.

Instead, the user should write business logic to determine whether a field should be ignored or not by the attributes of the IgnoreContext class.

For example, the following query:

"""
    query {
      matt: user(name: "matt") {
        email
      }
      andy: user(name: "andy") {
        email
        address {
          city
        }
        pets {
          name
          owner {
            name
          }
        }
      }
    }
"""

can have its depth limited by the following should_ignore:

from strawberry.extensions import IgnoreContext
def should_ignore(ignore: IgnoreContext):
return ignore.field_args.get("name") == "matt"
query_depth_limiter = QueryDepthLimiter(should_ignore=should_ignore)

so that it effectively becomes:

... (truncated)

Changelog

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

0.178.0 - 2023-05-22

This release introduces the new should_ignore argument to the QueryDepthLimiter extension that provides a more general and more verbose way of specifying the rules by which a query's depth should be limited.

The should_ignore argument should be a function that accepts a single argument of type IgnoreContext. The IgnoreContext class has the following attributes:

  • field_name of type str: the name of the field to be compared against
  • field_args of type strawberry.extensions.query_depth_limiter.FieldArgumentsType: the arguments of the field to be compared against
  • query of type graphql.language.Node: the query string
  • context of type graphql.validation.ValidationContext: the context passed to the query and returns True if the field should be ignored and False otherwise. This argument is injected, regardless of name, by the QueryDepthLimiter class and should not be passed by the user.

Instead, the user should write business logic to determine whether a field should be ignored or not by the attributes of the IgnoreContext class.

For example, the following query:

"""
    query {
      matt: user(name: "matt") {
        email
      }
      andy: user(name: "andy") {
        email
        address {
          city
        }
        pets {
          name
          owner {
            name
          }
        }
      }
    }
"""

can have its depth limited by the following should_ignore:

from strawberry.extensions import IgnoreContext
def should_ignore(ignore: IgnoreContext):
return ignore.field_args.get("name") == "matt"
query_depth_limiter = QueryDepthLimiter(should_ignore=should_ignore)
</tr></table>

... (truncated)

Commits

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 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.178.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 May 29, 2023
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github May 31, 2023

Superseded by #443.

@dependabot dependabot bot closed this May 31, 2023
@dependabot dependabot bot deleted the dependabot/pip/caster-back/main/strawberry-graphql-channels--lte-0.178.0 branch May 31, 2023 09:33
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.

0 participants