
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
- Can not migrate to self hosted instance ...
Hey! I want to migrate from Appwrite Cloud to a self hosted instance and it's a really frustrating journey for now. Exporting itself does not work, so I did w...
- Is it possible to initialize an Appwrite...
If I provide a project repository to someone, and within that repo there is an `appwrite.json`, is it possible to initialize the project in Appwrite from scratc...
- Cant set permission in console for organ...
Hi, I recently set up Appwrite on my server, and so far, it is awesome. Now I am trying to shift all my workflow to Appwrite. But I am facing one small issue. I...
