# GraphQL Connector Object to ID mapping rookie question

**URL:** <https://discuss.elastic.co/t/graphql-connector-object-to-id-mapping-rookie-question/369406>\
**Category:** Elasticsearch\
**Created:** [October 25, 2024, 9:28am UTC](https://discuss.elastic.co/t/graphql-connector-object-to-id-mapping-rookie-question/369406 "2024-10-25T09:28:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hairyJerry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hairyjerry/32/138689_2.png) [@hairyJerry](https://discuss.elastic.co/u/hairyJerry)\
**Post date:** [October 25, 2024, 9:28am UTC](https://discuss.elastic.co/t/graphql-connector-object-to-id-mapping-rookie-question/369406/1 "2024-10-25T09:28:10Z")

</div>

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:

```json
{
    "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:

```graphql
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
