From 8a253d68e181472d5ca6ed37139ce7db1a8dda7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Mon, 5 Jan 2026 19:35:53 +0100 Subject: [PATCH] Allow import of drops with errors --- twitch/schemas.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/twitch/schemas.py b/twitch/schemas.py index 81f3d0c..1617408 100644 --- a/twitch/schemas.py +++ b/twitch/schemas.py @@ -269,11 +269,26 @@ class Extensions(BaseModel): } +class GraphQLError(BaseModel): + """Schema for GraphQL error objects.""" + + message: str + path: list[str | int] | None = None + + model_config = { + "extra": "ignore", + "validate_assignment": True, + "strict": True, + "populate_by_name": True, + } + + class GraphQLResponse(BaseModel): """Schema for the complete GraphQL response from Twitch API.""" data: Data extensions: Extensions | None = None + errors: list[GraphQLError] | None = None model_config = { "extra": "forbid",