Query buffer size
GraphQL queries can return large responses that may exceed the default buffer size in Semarchy xDI. If a response exceeds this size, the mapping reaches the JVM memory limit, and fails with a GraphQLTransport error. This kind of error may occur in mappings that retrieve around 100 items, or even fewer, depending on the size of the items.
To manage response buffers, the GraphQL integration template exposes the parameter Buffer size, by query. This parameter sets the maximum size, in bytes, that xDI allocates in memory for each query response. It accepts integer values as follows:
-
0or below: sets the buffer size to the default,262144bytes. -
1and above: sets the buffer size to the specified value.
If you expect large responses, increase the buffer size to avoid mapping failures. However, be mindful of available memory when setting this parameter.