As mentioned in another answer there may be a max limit allowed for a single query, but you are also not passing the query parameter in the expected way. From the documentation you should use the Query
class from the SDK.
In this case to set the limit, you may need to instead add Query::limit(10)
to your queries array, like this:
// Use the Query class...
use Appwrite\Query;
$query = [
Query::limit(10), // Set the query limit to retrieve only 10 records
];
More details on the Queries can be found in the docs.
EDIT: Looking at the issues, there seems to be confusion around how to use queries, you may want to reference this issue where the syntax is a bit different:
use Appwrite\Query;
$q = new Appwrite\Query();
$query = [
$q->limit(10), // Set the query limit to retrieve only 10 records
];
You can try increasing that limit, but if you find that you need to retrieve more than the max allowed you will likely have to paginate your request. There is an example of how to do that with the use of limit and offset here. This is the example provided for the Node Client SDK:
import { Databases, Query } from "appwrite";
const client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1")
.setProject("[PROJECT_ID]");
const databases = new Databases(client);
// Page 1
const page1 = await databases.listDocuments(
'[DATABASE_ID]',
'[COLLECTION_ID]',
[
Query.limit(25),
]
);
const lastId = page1.documents[page1.documents.length - 1].$id;
// Page 2
const page2 = await databases->listDocuments(
'[DATABASE_ID]',
'[COLLECTION_ID]',
[
Query.limit(25),
Query.cursorAfter(lastId),
]
);
You could translate that to PHP and if needed turn it into a loop of some kind to iterate through the results instead of hardcoding the pages.