Native Object Client
    Preparing search index...

    Function getNativeObject

    • Gets a native object

      Type Parameters

      • T = any

      Parameters

      • uri: string & $brand<"primaryKeyUri"> | string & $brand<"namedKeyUri">
      • opts: Options = {}

      Returns Promise<T>

      The following example shows getting an instance of my-type with a primary key of foo:

      import { getNativeObject, primaryKeyUriString } from "@contextual-io/native-object-client"

      const instance = await getNativeObject(
      primaryKeyUriString("my-type/foo"),
      )

      The following example shows getting an instance of my-type using a key of bar with the value of baz:

      import { getNativeObject, namedKeyUriString } from "@contextual-io/native-object-client"

      const instance = await getNativeObject(
      namedKeyUriString("my-type/bar/baz"),
      )