Skip to main content

core.medplumclient.readresourcegraph

Home > @medplum/core > MedplumClient > readResourceGraph

MedplumClient.readResourceGraph() method

Executes the $graph operation on this resource to fetch a Bundle of resources linked to the target resource according to a graph definition

Signature:

readResourceGraph<K extends ResourceType>(resourceType: K, id: string, graphName: string, options?: MedplumRequestOptions): ReadablePromise<Bundle>;

Parameters

Parameter

Type

Description

resourceType

K

The FHIR resource type.

id

string

The resource ID.

graphName

string

name parameter of the GraphDefinition

options

MedplumRequestOptions

(Optional) Optional fetch options.

Returns:

ReadablePromise<Bundle>

A Bundle