Add support for batched GraphQL responses

This commit is contained in:
Joakim Hellsén 2026-01-12 03:13:39 +01:00
commit 1c13e25b17
No known key found for this signature in database
2 changed files with 27 additions and 0 deletions

View file

@ -449,3 +449,20 @@ class GraphQLResponse(BaseModel):
"strict": True,
"populate_by_name": True,
}
class BatchedGraphQLResponse(BaseModel):
"""Schema for batched GraphQL responses wrapped in a 'responses' array.
Handles cases where multiple GraphQL responses are collected and wrapped
in an outer object with a 'responses' field.
"""
responses: list[GraphQLResponse]
model_config = {
"extra": "forbid",
"validate_assignment": True,
"strict": True,
"populate_by_name": True,
}