Prometheus Entity Management API
    Preparing search index...

    Reactive snapshot returned by $entity(type, id).

    All properties are plain JS values tracked through Alpine.reactive(). Reading a property inside an Alpine x-effect, x-text, or :bind expression registers it as a dependency — mutations to the underlying graph slice update the property and re-run the dependent expression.

    interface AlpineEntitySnapshot<
        T extends Record<string, unknown> = Record<string, unknown>,
    > {
        data: T | null;
        error: string | null;
        isLoading: boolean;
        isReady: boolean;
        destroy(): void;
        refetch(): void;
    }

    Type Parameters

    • T extends Record<string, unknown> = Record<string, unknown>
    Index
    data: T | null

    Merged entity data (entities[type][id] + patches[type][id]), or null when not yet loaded.

    error: string | null

    Non-null when the last fetch ended with an error.

    isLoading: boolean

    true while a network fetch is in flight.

    isReady: boolean

    true when data is present AND no fetch is in flight.

    • Release graph subscription. Called automatically when the Alpine component is destroyed.

      Returns void

    • Imperatively invalidate + refetch this entity.

      Returns void