Open sunweiyang opened 7 months ago
If anyone else stumbles on this, I was able to work around it like so.
from dataclasses import dataclass
from strawberry.schema.config import StrawberryConfig
@dataclass
class CustomStrawberryConfig(StrawberryConfig):
def __post_init__(self, auto_camel_case: bool):
# for some reason, defining this at the class-level does not work
self.relay_max_results = 200
return super().__post_init__(auto_camel_case)
schema = strawberry.Schema(
query=Queries, mutation=Mutations, config=CustomStrawberryConfig()
)
Right now the only thing that can be changed in schema configs is
auto_camel_case
: https://strawberry.rocks/docs/types/schema-configurationsIt would be useful to similarly be able to set
relay_max_results
as follows, which is not possible right now:In the meantime, I need a workaround; my app needs a higher
relay_max_results
than the default 100. How can I accomplish this?Upvote & Fund