(item: BatchItem)
| 109 | }; |
| 110 | |
| 111 | const requestSingle = async (item: BatchItem): Promise<void> => { |
| 112 | try { |
| 113 | item.resolve(await gqlClient.request(item.document, item.variables)); |
| 114 | } catch (error) { |
| 115 | item.reject(error); |
| 116 | } |
| 117 | }; |
| 118 | |
| 119 | // A server without batching answers the array body with a plain object, so the |
| 120 | // items are retried one by one and the session stops sending arrays. |