ds_protocol_graphql_py_lib.dataset.request ========================================== .. py:module:: ds_protocol_graphql_py_lib.dataset.request .. autoapi-nested-parse:: **File:** ``request.py`` **Region:** ``ds_protocol_graphql_py_lib/dataset/request`` Immutable GraphQL-over-HTTP request snapshot used by pagination. Pagination only ever changes **variables**; the query document is never rewritten. .. rubric:: Example >>> snapshot = GraphqlRequestSnapshot(url="https://api/graphql", query="{ a }", variables={"x": 1}) >>> snapshot.with_variables({"after": "c1"}).to_payload() {'query': '{ a }', 'variables': {'x': 1, 'after': 'c1'}} Classes ------- .. autoapisummary:: ds_protocol_graphql_py_lib.dataset.request.GraphqlRequestSnapshot Module Contents --------------- .. py:class:: GraphqlRequestSnapshot One GraphQL POST: endpoint, document, variables, operation name, headers. .. py:attribute:: url :type: str .. py:attribute:: query :type: str .. py:attribute:: variables :type: dict[str, Any] .. py:attribute:: operation_name :type: str | None :value: None .. py:attribute:: headers :type: dict[str, str] | None :value: None .. py:method:: with_variables(values: dict[str, Any]) -> GraphqlRequestSnapshot Return a copy with ``values`` merged into variables. Injected values win over existing variables with the same name. The original snapshot is not modified. .. py:method:: to_payload() -> dict[str, Any] Build the JSON body for the GraphQL POST.