Type Parameters

Hierarchy

  • DeepClient

Implements

Constructors

Properties

DeepContext: Context<DeepClient<Link<number>>> = DeepContext
DeepProvider: ((__namedParameters) => Element) = DeepProvider

Type declaration

    • (__namedParameters): Element
    • Parameters

      • __namedParameters: {
            apolloClient?: IApolloClient<any>;
            children: any;
        }
        • Optional apolloClient?: IApolloClient<any>
        • children: any

      Returns Element

apolloClient: IApolloClient<any>
client: IApolloClient<any>
defaultDeleteName?: string
defaultInsertName?: string
defaultSelectName?: string
defaultUpdateName?: string
deleteReturning?: string
filesSelectReturning?: string
handleAuth?: ((linkId?, token?) => any)

Type declaration

    • (linkId?, token?): any
    • Parameters

      • Optional linkId: number
        Optional
      • Optional token: string
        Optional

      Returns any

insertReturning?: string
linkId?: number
linksSelectReturning?: string
minilinks: MinilinksResult<L>
returning?: string
selectReturning?: string
selectorsSelectReturning?: string
serializeQuery: ((exp, env?) => any) = serializeQuery

Type declaration

    • (exp, env?): any
    • Parameters

      • exp: any
      • env: string = 'links'

      Returns any

serializeWhere: ((exp, env?) => any) = serializeWhere

Type declaration

    • (exp, env?): any
    • Parameters

      • exp: any
      • env: string = 'links'

      Returns any

silent: boolean
table?: string
token?: string
updateReturning?: string
useDeep: (() => DeepClient<Link<number>>) = useDeep

Type declaration

useDeepQuery: (<Table, LL>(query, options?) => {
    data?: LL[];
    error?: any;
    loading: boolean;
}) = useDeepQuery

Type declaration

    • <Table, LL>(query, options?): {
          data?: LL[];
          error?: any;
          loading: boolean;
      }
    • Type Parameters

      • Table extends "objects" | "links" | "numbers" | "strings" | "can" | "selectors" | "tree" | "handlers"

      • LL = Link<number>

      Parameters

      • query: QueryLink
      • Optional options: {
            mini?: string;
            name?: string;
            returning?: string;
            table?: Table;
            variables?: any;
        }
        Optional
        • Optional mini?: string
        • Optional name?: string
        • Optional returning?: string
        • Optional table?: Table
        • Optional variables?: any

      Returns {
          data?: LL[];
          error?: any;
          loading: boolean;
      }

      • Optional data?: LL[]
      • Optional error?: any
      • loading: boolean
useDeepSubscription: (<Table, LL>(query, options?) => UseDeepSubscriptionResult<LL>) = useDeepSubscription

Type declaration

    • <Table, LL>(query, options?): UseDeepSubscriptionResult<LL>
    • Type Parameters

      • Table extends "objects" | "links" | "numbers" | "strings" | "can" | "selectors" | "tree" | "handlers"

      • LL = Link<number>

      Parameters

      • query: QueryLink
      • Optional options: {
            mini?: string;
            name?: string;
            returning?: string;
            table?: Table;
            variables?: any;
        }
        Optional
        • Optional mini?: string
        • Optional name?: string
        • Optional returning?: string
        • Optional table?: Table
        • Optional variables?: any

      Returns UseDeepSubscriptionResult<LL>

valuesSelectReturning?: string
resolveDependency?: ((path) => Promise<any>)

Type declaration

    • (path): Promise<any>
    • Parameters

      • path: string

      Returns Promise<any>

Methods

  • This function fetches the corresponding IDs from the Deep for each specified path.

    Parameters

    • Rest ...paths: [DeepClientStartItem, ...DeepClientPathItem[]][]

      An array of [start, ...path] tuples. Each tuple specifies a path to a link, where 'start' is the package name or id and ...path further specifies the path to the id using Contain link values (names).

      Rest

    Returns Promise<any>

    • Returns a Promise that resolves to an object. The object has keys corresponding to the package name or id of each path. The value for each package key is an object where keys are the items in the corresponding path, and the values are the IDs retrieved from the Deep.

    Async

    Function

    ids

    Throws

    Will throw an error if the id retrieval fails in this.id() function.

    Example

      const ids = await deep.ids([
    ['@deep-foundation/core', 'Package'],
    ['@deep-foundation/core', 'PackageVersion']
    ]);

    // Outputs
    // {
    // "@deep-foundation/core": {
    // "Package": 2,
    // "PackageVersion": 46
    // }
    // }

Generated using TypeDoc