Does anyone know exactly what is included in the payload when Forge makes a graphql call prior to the form submit callback?
My app has a a form, which upon submission is throwing a 413:
{
"timestamp": 1690920931636,
"path": "/central/graphql",
"status": 413,
"error": "Payload Too Large",
"message": "GraphQl query and variables must not exceed 512000 bytes in size",
"requestId": "061700d0-7918838",
"exception": "io.atlassian.graphql.gateway.http.request.RequestTooLargeException",
"request_id": "UNKNOWN",
"query": "unknown",
"operation": "unspecified",
"schema": "unspecified",
"errorSource": "GRAPHQL_GATEWAY"
}
However, the submit callback is never invoked, so it is extremely difficult to debug this ābehind the scenesā error - and itās not evident anywhere in the documentation.
What appears to be happening is Forge is making this graphql call with ALL component state data - which again, is extremely confusing. Can anyone clear this up for me? A simplified code example is below:
import ForgeUI, { render, Fragment, Form, Select, Option, useState } from '@forge/ui';
const App = () => {
const [someState, setSomeState] = useState(null); // This non-form data seems to affect payload size???
const onSubmit = async (formData) => {
// this callback is never called, 413 error is shown in UI to users instead
}
return (
<Fragment>
<Form onSubmit={onSubmit} submitButtonText="Submit">
<Select label="Options" name="options">
<Option label="Option" value="option" />
</Select>
</Form>
</Fragment>
);
};
export const run = render(
<App />
);
Thanks,
Scott