queryDef is configured to return maximum 10000.
you have two options:
1. Break your query in multiple parts by providing some range or filters
2. write one custom sql script for your query and execute that from your js activity.