Skip to content

Customizable ExecutionResult, or how to get other API response parts #188

Closed
@extrin

Description

@extrin

return ExecutionResult(errors=result.get("errors"), data=result.get("data"))

Case:

The GraphQL API that I need to make requests to, responds with some other useful information, except of data block:

{
    "data": {...},
    "extensions": {
        "pageInfo": {
            "limitPage": 200,
            "totalCount": 23306516,
            "hasNextPage": true,
            "lastId": 41922710
        }
    }
}

But, as gql transport composes ExecutionResult from data and errors blocks only, I'm not able to get and use the extensions part in my code.
I was hoping to use hasNextPage and lastId values to iterate through pages of data, to load all the data to database.

Question:

Is there any way to get extensions part of response, along with data and errors, using gql?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions