SoftInstigate/restheart

Improve validation of mappings in GraphQL app definition

ujibang opened this issue · 0 comments

Brief overview

Improve the validation of mappings in GraphQL app definition to improve the developer experience.

Example of possibile improvements are:

  • Name of the GraphQL field of a mapping is not validated which makes debugging any problems with missing data when querying during development very time-consuming.
    Example: If data is missing when querying, it is currently hard to tell if there is a typo in a GraphQL field mapping (i.e., the field simply isn't mapped) or if the underlying document data is missing.
  • Name/path of the document field of a mapping is not validated which also makes debugging any problems with data fetching very time-consuming.
    Example: If data is missing when querying, it is currently hard to tell if there is a typo in the name/path of the document field or if the underlying document data is missing.

Perform some basic validation when the gql-app definition is created and either reject the request completely or at least include some warnings in the response.

Rationale

Improve the developer experience

Detailed documentation

TBD