Skip to content

[GraphQL] Custom errors for graphql endpoint #3024

@mahmoodbazdar

Description

@mahmoodbazdar

In GraphQL php library that Api platform is using it user can define custom error format.
Here is documentation for custom errors in php GraphQL library:
https://webonyx.github.io/graphql-php/error-handling/#custom-error-handling-and-formatting

I think we should add this feature so developers can create their own error formats based on exceptions.

Example 1: We don't have status codes for errors and I think its helps if we return a status property in error object so frontend developer can decide how to show it .

Example 2: Validation errors format isn't good now. All of error massages concat in one string and frontend developer needs to do some process on error string on every error messages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions