Skip to content

Cosmos: Add config validations to ensure GraphQL types are either entity names or singular types #893

Open
@Aniruddh25

Description

@Aniruddh25

Today, both the runtime configuration and the GraphQL schema are provided by the customer. For the engine, to behave correctly, the types specified in the GraphQL schema here:

type Planet @model(name:"Planet"){

should match either

  1. the entity name in the runtime configuration see this:
    or
  2. the graphql.type.singular property of the entity:

It is quite possible to have configuration errors, where the schema doesn't match the configuration. This issue is to add validations at startup to make sure these errors are easily found and a useful error is given to the developer to correct their configuration as per the graphql schema.
E.g. of someone who already encounter this: #876

Metadata

Metadata

Assignees

Labels

cosmosusabilityMake the APIs more user friendly with better exceptionsvalidation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions