Skip to content

Commit fe6f2b3

Browse files
authored
Enable batching up to 25 GQL operations over http (#3362)
The default limit is 10. I'm not really sure if we should use that or 25 is fine or what. This allows a single HTTP request instead of 25 requests for 25 operations. So this is an optimization for this protocol layer. All of these operations are still processed individually/independently. But it is possible for future work to optimize more. Like the data loaders could be cached by batched request instead of each operation.
1 parent a3e6876 commit fe6f2b3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/graphql/driver.ts

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export class Driver extends AbstractDriver<DriverConfig> {
5151
...options,
5252
graphqlEndpoint: options.path,
5353
logging: false,
54+
batching: { limit: 25 },
5455
});
5556

5657
fastify.route({

0 commit comments

Comments
 (0)