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

ParameterTypeDescription
resourceTypeKThe FHIR resource type.
idstringThe resource ID.
graphNamestringname parameter of the GraphDefinition
optionsMedplumRequestOptions(Optional) Optional fetch options.

Returns:

ReadablePromise<Bundle>

A Bundle