• Project a schema by a selection set (select / include / omit / where).

    Type Parameters

    • T = any

      The type to derive filter patterns from

    Parameters

    • schema: JSONSchema7

      The (typically dereferenced) schema to project

    • filterOptions: GraphTraversalFilterOptions<T>

      The selection set / filter options to apply

    • OptionalrootSchema: JSONSchema7

      The root schema for resolving refs in nested filters

    • depth: number = 0

      Current recursion depth for nested projection

    Returns JSONSchema7

    A new schema with projected properties