-
-
Notifications
You must be signed in to change notification settings - Fork 509
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
Extend query documentation #3390
Extend query documentation #3390
Conversation
Add examples with using decorator, arguments and `strawberry.argument`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have skipped reviewing this pull request. All the files appear to be documentation files, which we're not great at reviewing... yet!
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @ThirVondukr, LGTM :)
Co-authored-by: Jonathan Ehwald <github@ehwald.info>
deprecation_reason="isTasty argument is deprecated, " | ||
"use fruits(taste:SWEET) instead", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about 🤔
deprecation_reason="isTasty argument is deprecated, " | |
"use fruits(taste:SWEET) instead", | |
deprecation_reason="isTasty argument is deprecated, use fruits(taste:SWEET) instead", |
@strawberry.type
class Query:
@strawberry.field
def fruits(
self,
is_tasty: Annotated[
bool | None,
strawberry.argument(
description="Filters out fruits by whenever they're tasty or not",
deprecation_reason="isTasty argument is deprecated, "
"use fruits(taste:SWEET) instead",
),
] = None,
) -> list[str]: ...
@strawberry.type
class Query:
@strawberry.field
def fruits(
self,
is_tasty: Annotated[
bool | None,
strawberry.argument(
description="Filters out fruits by whenever they're tasty or not",
deprecation_reason="isTasty argument is deprecated, use fruits(taste:SWEET) instead",
),
] = None,
) -> list[str]: ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This it a bit too long (101) characters, it's hard to read in git diffs, and black by default recommends 88-80 character limit
Extends query documentation, adding examples with using decorator, arguments and
strawberry.argument
Description
Types of Changes
Issues Fixed or Closed by This PR
Checklist