validateAsSchema

Validate the given document as a schema:

  • Add the builtin definitions if they are not present already

  • Process any @link directive and imports definition if any

  • ensure uniqueness of schema/types/directives definitions

  • Merge type extensions

Although some validation is performed, this function does not pretend to implement the full GraphQL validation rules.

Receiver

the input document to validate and merge. It should not contain any builtin types The current validation is very simple and will only catch simple errors

Return

a GQLResult containing the schema and any potential issues