by Robert Payne.
Never mind I worked out that I needed to use system context. Using the following arguments got me all the cohorts in my moodle test site.
args: { query:'', context:{instanceid:10,contextlevel:'system'}, limitnum:100 }