openneuro
openneuro copied to clipboard
GraphQL queries failing
Describe the bug Attempting to download the filenames of a dataset via a Graphql query in a python testcase. The Query returns the expected result on some days immediately and sometimes it fails even after multiple attempts with different waiting periods between queries.
To Reproduce Steps to reproduce the behavior:
-
This is the used query
query_example = f"""query{{ dataset (id: "{openneuroID}"){{ latestSnapshot{{ id files(prefix: null){{ filename }} }} }} }}""" -
The code will attempt the download three times before failing if no status code 200 is returned.
Expected behaviour Requests always returning the expected result from the query and not failing without a particular reason