I try to recive a large json response from eyternal graphQL, but I recive alwais the same issiue.
ERROR Error: Uncaught (in promise): SyntaxError: Unterminated string in JSON at position 999958
SyntaxError: Unterminated string in JSON at position 999958
My code looks like that:
async graphQl(body) {
const response = await fetch(url, {
method: 'POST',
headers: this.headers,
body: JSON.stringify(body),
});
if (response.ok) {
return await response.json();
} else {
throw new Error('GraphQL request failed: ' + response.status);
}
}
and
try {
const body = {
query: req.payload,
};
console.log("body", body)
let responseQL = await graphQl(body)
res.send(JSON.stringify(responseQL));
} catch (error) {
res.json({ error: error });
}
I checked server-side. And with Postman I dont have any problem on the external graphQL Server
There is a maximum response for Appwrite functions. After that, the data is truncated.
Is there a possibility to change it?
Not without modifying the source code. For such a large response, maybe you can use the storage API instead
I think the next version of functions might remove the limit
That would be great, Do you know when the next Version will be released?
some time this year π hard to say for sure. we're actively working on it, though
Recommended threads
- How to disable appwrite/embedding from s...
Hi everyone! I'm currently running a self-hosted instance of Appwrite. For my current use case, I don't need the AI/embedding features, and I noticed the `app...
- Invalid type for attribute 'email': emai...
I'm using the node-appwrite SDK to create a table, the column payload looks like this: ```json [{"key":"email","type":"email","required":true, "size": 512}] ``...
- Git connection is not working anymore on...
Hello all, I updated from 1.8.1 to 1.9.0 then 1.9.5. All seems to work even the Github connection. In Git configuration I see my Github user but when trying to...