This function is used to build out the results for connection based on the
query that has been passed into it. The query is a callback to the a function
which is responsible for creating original query, which is necessary as when
the query is run the function will have to make another call to getTraitGraphConnection
as they cannot be reused.
This function is used to build out the results for connection based on the query that has been passed into it. The query is a callback to the a function which is responsible for creating original query, which is necessary as when the query is run the function will have to make another call to getTraitGraphConnection as they cannot be reused.