I am trying to send JSON data for graph ql query JSON DATA:
{
"dataIds": ["1224rr67-4b3e-473c-80a7-dccc480fb6c0", "28avxrb8-5ff6-45ef-b51b-d4f654321bf8"]
}
GRAPH QL query:
query GetDataByIds($dataIds: [uuid!]) {
view_data(where: {data_id: {_in: $dataIds}}) {
data_id
created_on
updated_on
}
}
I am facing issue that as you see above JSON, the array is of type [String]
(String array) but when i call Graph QL, it gives me this error:
{
"path": "$",
"error": "The variable type for the expected variable dataIds was not supported.",
"code": "bad-request"
}
It means that [String]
is not parsed to [uuid]
, which i am assuming are equivalent.
Is there any way i can convert [String]
to [uuid]
in graph ql query (I cannot change the Database column which is of type uuid
)
Anyone having solution, kindly share