Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Schema validation #25

Description

@jjergus

This is distinct from request (query) validation (#10). We need to ensure that all types in the GraphQL schema are well-defined, e.g. things like:

  • there are no 2 types with the same name
  • there are no 2 fields with the same name on an object/interface type
  • object types correctly implement interfaces (mostly enforced by Hack, but there might be additional restrictions that Hack can't check -- e.g. GraphQL arguments are named, so fields on object types must have arguments with names that are consistent with the interface)
  • ...

The spec describes all necessary checks in the Schema and Type sections (search for "Type Validation").

These can be implemented as part of the codegen (we should avoid ever generating an invalid type/schema), there should be no need to do any checks at runtime.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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