Skip to content

Partial Error That Doesn't Nullify Data #432

@ievgenklymenko

Description

@ievgenklymenko

Is there a natural solution for partial errors?

Say we have an existing schema, with a scalar non-nullable field, and we need both the field data and error which occurred when resolving that field presented in top-level 'errors' in response; this is legal by GraphQL spec.

#374 issue was closed, but solved only for that, particular, (array data) case. Because there, it is possible to return exception (which turns to null in response) instead of array element. But we can't return exception because that would erase resolved data.

So the only solution is to do manual manipulations with response, is that it? There is no natural way of doing it in webonyx/graphql-php ?

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