Gets a native object
The following example shows getting an instance of my-type with a primary key of foo:
my-type
foo
import { getNativeObject, primaryKeyUriString } from "@contextual-io/native-object-client"const instance = await getNativeObject( primaryKeyUriString("my-type/foo"),) Copy
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:
bar
baz
import { getNativeObject, namedKeyUriString } from "@contextual-io/native-object-client"const instance = await getNativeObject( namedKeyUriString("my-type/bar/baz"),) Copy
import { getNativeObject, namedKeyUriString } from "@contextual-io/native-object-client"const instance = await getNativeObject( namedKeyUriString("my-type/bar/baz"),)
Gets a native object