Skip to content

Allow errors and data #22

@barbieri

Description

@barbieri

Sometimes the returned object contains both errors and data, for instance when executing a query such as:

query {
   fieldOk
   fieldFailed
}

If fieldFailed is null-able and during its resolve it fails, the return will be something like:

{"data": {"fieldOk": "value", "fieldFailed": null},
 "errors": [{"message": "some error message", "paths": ["fieldFailed"]}]
}

Then throwing an exception is not the best thing to do. My suggestion is to just pass-thru the result dict and let the user handle that -- but that breaks API, then you may consider a new execute() method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions