uc-cdis / peregrine

GraphQL search API service
Apache License 2.0
12 stars 9 forks source link

PXD-1202 ⁃ Fix datanode bug on argument 'first' #58

Closed paulineribeyre closed 6 years ago

paulineribeyre commented 6 years ago

A graphql query on datanode with argument first: N should return N entries, but it returns N entries for each type of data file.

This is due to the way peregrine resolves datanode: if there are X types of file, it sends X queries, applies the arguments X times and concatenates the X results.

Could be fixed by checking if first: N is an argument of the query and stopping the loop on file types after N iterations.