docs: make resolver examples self-contained - #4581
Conversation
|
Thanks for adding the Below is the changelog that will be used for the release. This release fixes resolver documentation examples so they can be copied and run independently. The field resolver and method resolver examples now include the required This release was contributed by @subham-hq in #4581 |
Greptile SummaryThis PR makes two resolver documentation examples independently executable and adds patch-release metadata.
Confidence Score: 5/5The PR appears safe to merge with no actionable issues identified. The changed examples resolve all referenced names within their respective code fences and remain consistent with established Strawberry resolver syntax.
|
| Filename | Overview |
|---|---|
| docs/types/resolvers.md | Both updated examples now contain all required imports and type definitions, with no concrete issues identified. |
| RELEASE.md | Adds patch-release metadata that accurately describes the documentation-only change. |
Reviews (1): Last reviewed commit: "docs: make resolver examples self-contai..." | Re-trigger Greptile
bellini666
left a comment
There was a problem hiding this comment.
This is a docs change only, it doesn't need a RELEASE.md file, so I removed it. Thanks for it 😊
|
Thanks for reviewing and merging this! Appreciate the clarification on RELEASE.md, I’ll keep that in mind for future docs contributions. |
Summary
This PR makes two resolver examples in
docs/types/resolvers.mdself-contained so they can be copied and executed independently.Previously, the examples under:
relied on definitions introduced earlier on the page. Copying either snippet by itself resulted in a
NameErrorbecause the requiredstrawberryimport and/orUsertype definition were missing.Changes
This PR updates both examples to include:
import strawberryUserStrawberry type used by the resolverNo resolver behavior or library code has been changed.
A
RELEASE.mdfile is also included in accordance with the project's contribution guidelines.Validation
The original snippets were first executed independently to reproduce the issue.
The failures were:
and:
After updating the examples, both snippets were copied and executed independently with:
and completed successfully with exit code
0.The changed files were also validated with:
All applicable pre-commit checks passed, including:
alexprettiertrim trailing whitespacecheck for merge conflictsfix end of filesblacken-docsScope
The change is intentionally limited to these two resolver examples rather than updating all documentation snippets at once.
This follows the incremental approach described in #1294, where individual documentation snippets can be updated in separate contributions.
Addresses #1294
Summary by Sourcery
Make resolver documentation examples self-contained for independent execution.
Enhancements:
Documentation:
Chores: