Package compiler
provides types and interfaces for interacting with or implementing
a compiler for the GraphQL IDL.
- Import Tree Reduction
- Type Validation
- Type Merging
GraphQL documents can import one another with the following directive:
directive @import(paths: [String]!) on DOCUMENT
Type Validation/Checking is provided by implementing the TypeChecker
interface. The
Validate
function is a TypeChecker
that enforces type validation, per the GraphQL spec.
Type merging handles merging type extensions with their original type definition.