Function findChildren

  • Find all the child objects of a root (top-level) object.

    The parent collection is determined by the reference in the child collection.

    This method has a nextToken, which is used for pagination - it is returned when there is more values to retrieve. You should write your code to repeatedly call findChildren with the nextToken value of the previous call until it comes back undefined in order to retrieve all the values.

    Type Parameters

    Parameters

    • ctx: Context

      the context

    • childCollectionName: string

      name of the child object collection

    • rootObjectId: string

      the _id of the root object

    • Optional nextToken: Key

      the next token from the previous call, or undefined if there are no more values

    • options: FindChildrenOptions = {}

      the options to control the query

    Returns Promise<FindChildrenResults<DocumentType>>

    Throws

    when the collection is not found in the context

Generated using TypeDoc