@grafctory/keep
    Preparing search index...

    Function getFlakeTemplate

    • Rebuilds the retrieval template a node's branches request.

      A connector expanding the resource a node reaches can retrieve it under the template the original request stated, with no need to rebuild that template from the tree. Each branch carrying a drain maps its property name to the query it requests, criteria included. A branch present only to carry constraints is left out. A projected branch is left out too: it is a binding of the enclosing projection (qest §5.2), not part of the node's template. A node reached only by such bindings thus gets an empty template, and its value is returned as a bare reference. Given a variant shape, the template keeps only the branches that variant declares (qest §5.5), so each variant of a union is expanded under its own template.

      Parameters

      • flake: Flake

        The node whose branches to read

      • Optionalshape: Shape

        One of the range variants to restrict the template to

      Returns Template

      The template flake's branches request, keyed by property name