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

Testing #3743

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Testing #3743

wants to merge 2 commits into from

Conversation

patrick91
Copy link
Member

@patrick91 patrick91 commented Dec 26, 2024

Summary by Sourcery

Enhancements:

  • Store the resolver function in the _resolver attribute of the field object.

Copy link
Contributor

sourcery-ai bot commented Dec 26, 2024

Reviewer's Guide by Sourcery

This pull request introduces a temporary workaround to resolve an issue where the resolver is not correctly set on a field. A TODO comment has been added to indicate that a more robust solution needs to be implemented in the future.

Sequence diagram for field resolver assignment

sequenceDiagram
    participant SchemaConverter
    participant Field
    SchemaConverter->>SchemaConverter: from_field()
    SchemaConverter->>SchemaConverter: from_resolver(field)
    Note right of SchemaConverter: Get resolver
    SchemaConverter->>Field: _resolver = resolver
    Note right of Field: Temporary workaround
    SchemaConverter->>SchemaConverter: from_maybe_optional()
Loading

Class diagram showing Field resolver modification

classDiagram
    class SchemaConverter {
        +from_field(field)
        +from_resolver(field)
        +from_maybe_optional()
    }
    class Field {
        -_resolver
    }
    SchemaConverter ..> Field : modifies
    note for Field "Temporary _resolver assignment added as workaround"
Loading

File-Level Changes

Change Details Files
Set the resolver directly on the field object.
  • Added a temporary workaround to set the resolver directly on the field object.
  • Added a TODO comment to track the need for a more robust solution in the future.
strawberry/schema/schema_converter.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@patrick91
Copy link
Member Author

/pre-release

@botberry
Copy link
Member

Pre-release

👋

Releasing commit [7354b47] to PyPi as pre-release! 📦

@botberry
Copy link
Member

Pre-release

👋

Pre-release 0.257.0.dev.1735244504 [7354b47] has been released on PyPi! 🚀
You can try it by doing:

poetry add strawberry-graphql==0.257.0.dev.1735244504

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.27%. Comparing base (e78f8c6) to head (7354b47).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3743   +/-   ##
=======================================
  Coverage   97.27%   97.27%           
=======================================
  Files         501      501           
  Lines       33408    33409    +1     
  Branches     5480     5480           
=======================================
+ Hits        32499    32500    +1     
  Misses        701      701           
  Partials      208      208           

Copy link

codspeed-hq bot commented Dec 26, 2024

CodSpeed Performance Report

Merging #3743 will not alter performance

Comparing feature/🐦‍🔥_ (7354b47) with main (e78f8c6)

Summary

✅ 21 untouched benchmarks

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.

2 participants