Skip to content

Question: Form validation #179

Closed
Closed
@xpepermint

Description

@xpepermint

Let's say you have a form which posts data to API server. The API server validates the input and returns JSON object. If the input is invalid an error objects {errors: {field1: "is required"}} is returned. How do we handle and serve these kind of errors when using GraphQL? How and where should data validation be implemented (should that be part of my GraphQL code, maybe inside each resolve function)?

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