Hello,
I am trying to index a small test GraphQL data as a proof of concept. Having no better Ideas, I decided to map over the edges, i.e. the response I am trying to map looks like this:
{
"data": {
"getItemListing": {
"edges": [
{
"node": {
"id": "138",
"creationDate": 1722425931,
"modificationDate": 1727698430,
}
},
{
"node": {
"id": "140",
"creationDate": 1722426900,
"modificationDate": 1724839829,
}
},
{
"node": {
"id": "144",
"creationDate": 1722587008,
"modificationDate": 1727692667,
}
},
{
"node": {
"id": "156",
"creationDate": 1724408719,
"modificationDate": 1727690841,
}
}
]
}
}
}
With test GraphQL Body being:
query getItemListing {
getItemListing(first: 10, after: 0) {
edges {
node {
id,
creationDate,
modificationDate,
}
}
}
}
The problem I am having is with the fact that I am requesting a list (edges) instead of an object, which is a no-no for the Elastic.
Both GraphQL and Elastic are new topics to me, so I'm not quite sure whether the fault is in the query design stage or maybe I can map with this query with some aditional setup of the connector/index at the CLI/APIs level.
Any pointers to appropriate documentation pages or hints of any kind are much appreciated.
Cheers,
Jerry