hasura / hasura/graphql-data-specification

Field constraints in GraphQL schemas

Open
#21 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
19
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I really like the idea of GDS ... and even the current Hasura metadata model! 😃

One aspect of Hasura-generated GraphQL schemas that I find lacking is the absence of constraints on model fields. While I understand that this isn't natively supported by GraphQL schemas, it would be incredibly helpful for clients utilizing the GraphQL schema to be aware of these constraints. Examples of useful constraints include field requirements, numerical data ranges, or text data formats (such as email, URL, or regex-defined constraints).

In an ideal world, Hasura metadata or GDS could be used to define field constraints and generate GraphQL directives (such as `@constraint`) for the fields. Is there a plan to implement such a feature in GDS?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.