In the code I am calling the GraphQL API with a request having the parameter fields
as an array of 21 objects along with an image.
If fields
has 15 objects, the GraphQL API request goes through fine. But, if it is more than that (15 objects), then the network request fails.
Below is the Cypress code wrote to fire the GraphQL call.
cy.intercept('/graphql', (req) => {
aliasImageUpload(req, 'sendImage')});
export const aliasImageUpload = (req, operationName) => {
const { body } = req;
if (body.byteLength) {
req.alias = `gql${operationName}ImageUpload`
}
}
What can I do to make the GraphQL API request be successful if the fields
parameter has more number of objects (>15)?