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
Describe the Bug
I'm trying to follow the documentation, but when I run the code from
Testingsection I get the errorGraphQLError("Unknown argument 'title' on field 'Query.books'.", ....It's said that we should use the schema from the Getting Started tutorial. The code is:
I think we have to either add
titleparameter toget_booksor removetitleparameter fromTestQuery.Ready to send a PR if it's needed
System Information
Additional Context