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

Add ability to set a custom info class for a schema #3592

Merged
merged 14 commits into from
Sep 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use 'strawberry.Info' instead of 'strawberry.types.Info' in info_clas…
…s docs

Co-authored-by: Jonathan Ehwald <[email protected]>
  • Loading branch information
parafoxia and DoctorJohn committed Aug 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 941e3faca13af74483f0096276c839f72315fd06
4 changes: 2 additions & 2 deletions docs/types/schema-configurations.md
Original file line number Diff line number Diff line change
@@ -108,9 +108,9 @@ schema = strawberry.Schema(

### info_class

By default Strawberry will create an object of type `strawberry.types.Info` when
By default Strawberry will create an object of type `strawberry.Info` when
the user defines `info: Info` as a parameter to a type or query. You can change
this behaviour by setting `info_class` to a subclass of `strawberry.types.Info`.
this behaviour by setting `info_class` to a subclass of `strawberry.Info`.

This can be useful when you want to create a simpler interface for info- or
context-based properties, or if you wanted to attach additional properties to