-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Whenever we want to query a nested graph. We may want to insert dynamic properties inside the resource.
const validOrgUnitsQuery = {
orgUnits: ({ dataSetId, orgUnit }) => ( {{
resource: `dataSets/${dataSetId}/organisationUnits/gist`,
params: {
fields: ["id"],
filter: `path:like:${orgUnit}`,
total: true,
},
}),
};
and later I may want to do
const { loading, error, data, refetch } = useDataQuery(
validOrgUnitsQuery,
{ variables: { dataSetId: selectedDataSet?.id, orgUnit: selectedOrgUnit?.id })
Currently, it is not supported getting the following error object
{
"type": "invalid-query",
"details": [
"[orgUnits] Property resource must be a string"
]
}
Metadata
Metadata
Assignees
Labels
No labels