splatnet3_scraper.auth.GraphQLQueries.query_body_hash(query_hash, variables={})

Generates the body for the GraphQL queries, as a string.

The body is generated using the query hash and the variables that are passed in. The body is a JSON string that contains the query hash and the variables. An example of the body that is generated is shown below.

>>> body = {
...     "extensions": {
...         "persistedQuery": {
...             "sha256Hash": query_hash,
...             "version": 1,
...         }
...     },
...     "variables": variables,
... }
Parameters:
query_hash : str | bytes

The hash of the query.

variables : dict[str, Any]

The variables to pass to the query. If the query does not take any variables, this can be an empty dictionary. Defaults to {}.

Returns:

str – The body for the GraphQL queries, as a string.