Long query extraction

#1

I have this code as my query :

export const query = graphqlquery 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 ?

0 Likes