QueryConstructionContext: {
    depth: number;
    excludedProperties: string[];
    filterOptions: GraphTraversalFilterOptions;
    flavour: SPARQLFlavour;
    maxRecursion: number;
    prefixMap: Prefixes;
    resolveInverseMaxDepth: number;
    schema: NormalizedSchema;
    varCounter: { value: number };
}

Context for query construction Carries all necessary state through the recursion Similar to ExtractionContext in graph-traversal

Type declaration

  • depth: number

    Current recursion depth

  • excludedProperties: string[]

    Properties to exclude from the query

  • filterOptions: GraphTraversalFilterOptions

    Filter options (select, include, omit, where) carried through recursion

  • flavour: SPARQLFlavour

    SPARQL dialect for BIND/VALUES and filter generation

  • maxRecursion: number

    Maximum recursion depth

  • prefixMap: Prefixes

    Prefix mappings for property names

  • resolveInverseMaxDepth: number

    Max depth at which inverse (x-inverseOf) properties are resolved. Default 0 = root only.

  • schema: NormalizedSchema

    The current schema being processed

  • varCounter: { value: number }

    Shared mutable counter for generating globally unique SPARQL variable names. Wrapped in an object so the reference is preserved across recursive calls.