-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the Bug
I'm trying to follow the documentation, but when I run the code from Testing section I get the error GraphQLError("Unknown argument 'title' on field 'Query.books'.", ....
It's said that we should use the schema from the Getting Started tutorial. The code is:
import typing
import strawberry
@strawberry.type
class Book:
title: str
author: str
def get_books():
return [
Book(
title="The Great Gatsby",
author="F. Scott Fitzgerald",
),
]
@strawberry.type
class Query:
books: typing.List[Book] = strawberry.field(resolver=get_books)
schema = strawberry.Schema(query=Query)
I think we have to either add title parameter to get_books or remove title parameter from TestQuery.
Ready to send a PR if it's needed
System Information
- Operating system: Ubuntu
- Strawberry version (if applicable): latest
Additional Context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working