Skip to content

Update all non-major dependencies #201

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

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 16, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
SQLAlchemy (changelog) 2.0.34 -> 2.0.35 age adoption passing confidence
strawberry-graphql (source, changelog) 0.240.4 -> 0.241.0 age adoption passing confidence

Release Notes

strawberry-graphql/strawberry (strawberry-graphql)

v0.241.0

Compare Source

You can now configure your schemas to provide a custom subclass of
strawberry.types.Info to your types and queries.

import strawberry
from strawberry.schema.config import StrawberryConfig

from .models import ProductModel

class CustomInfo(strawberry.Info):
    @​property
    def selected_group_id(self) -> int | None:
        """Get the ID of the group you're logged in as."""
        return self.context["request"].headers.get("Group-ID")

@​strawberry.type
class Group:
    id: strawberry.ID
    name: str

@​strawberry.type
class User:
    id: strawberry.ID
    name: str
    group: Group

@​strawberry.type
class Query:
    @​strawberry.field
    def user(self, id: strawberry.ID, info: CustomInfo) -> Product:
        kwargs = {"id": id, "name": ...}

        if info.selected_group_id is not None:

### Get information about the group you're a part of, if
### available.
            kwargs["group"] = ...

        return User(**kwargs)

schema = strawberry.Schema(
    Query,
    config=StrawberryConfig(info_class=CustomInfo),
)

Contributed by Ethan Henderson via PR #​3592


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from febus982 as a code owner September 16, 2024 19:12
@renovate renovate bot force-pushed the renovate/all-minor-patch branch from b73eb38 to 627759f Compare September 16, 2024 21:44
@renovate renovate bot changed the title Update dependency strawberry-graphql to v0.241.0 Update all non-major dependencies Sep 16, 2024
Copy link

Code Climate has analyzed commit 627759f and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (100% is the threshold).

This pull request will bring the total coverage in the repository to 100.0% (0.0% change).

View more on Code Climate.

@febus982 febus982 merged commit c507c64 into main Sep 16, 2024
11 checks passed
@febus982 febus982 deleted the renovate/all-minor-patch branch September 16, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant