# Long query extraction

**URL:** <https://discourse.getcockpit.com/t/long-query-extraction/668>\
**Category:** Support\
**Created:** [March 19, 2019, 8:14pm UTC](https://discourse.getcockpit.com/t/long-query-extraction/668 "2019-03-19T20:14:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hypothesis-github](https://avatars.discourse-cdn.com/v4/letter/h/9de0a6/32.png) [@Hypothesis-github](https://discourse.getcockpit.com/u/Hypothesis-github)\
**Post date:** [March 19, 2019, 8:14pm UTC](https://discourse.getcockpit.com/t/long-query-extraction/668/1 "2019-03-19T20:14:53Z")

</div>

I have this code as my query :

> export const query = graphql` query cockpitHe { allCockpitHello { edges { node { Name { value } } } } }`

and the output for me is pretty complicated

> props.data.allCockpitHello.edges.map(element=\>element.node)

and this is really long and I am pretty sure there should be an easier way to use my data, I mean the whole point of using graphql is its simplicity.

can you please correct me ?
