LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-sdkstreamsubscriptioncompute_union_filter
    Function●Since v0.3

    compute_union_filter

    Copy
    compute_union_filter(
        subscriptions: list[dict[str, Any]],
    ) -> dict[
    View source on GitHub
    str
    ,
    Any
    ]

    Parameters

    NameTypeDescription
    subscriptions*list[dict[str, Any]]

    Aggregate a set of subscription filters into one covering filter.

    Direct port of client/stream/index.ts:#computeUnionFilter.

    • Channels are unioned.
    • Namespaces: if any subscription omits namespaces (wildcard), the union is unscoped (omits the key). Otherwise, deduplicated union.
    • Depth: if any subscription omits depth (unbounded), the union is unbounded (omits the key). Otherwise, take the max. depth=0 is a valid bounded value — never omit when all subscriptions provide it.

    list of SubscribeParams-shaped dicts.