Query batching in Apollo 2

Hi, in Apollo 1.x I use to enable query batching like so:

const networkInterface = createMeteorNetworkInterface({batchInterval: 100});

very simple. How can I achieve the same with Apollo 2, since my network interface changed to:

const httpLink = new HttpLink({ uri: Meteor.absoluteUrl('graphql') });

not really finding any help in the documentation on this. Any suggestions would be appreciated.

For those interested, Nice to see the Apollo 2 update at the start of November reduced the average resolution time by almost a second. Would like to see if batching can further speed this up.

(if you saw the previous chart on this post, I accidentally pulled it from dev environment, not production, so that one was wrong.)

1 Like

I think you have to add one more link: apollo-link-batch-http

1 Like

Thanks thats the one I was looking for!

1 Like

@sashko That new Apollo site menu is not very intuitive. The Docs menu in two places was the thing that I missed. Maybe appending the links to the other Docs on bottom of the left menu as well instead of only in the dropdown - which can easily be missed since you click on docs link and it takes you to a docs page, but I never realized I missed the dropdown. Was only looking in the left menu because I thought I was already under all the Apollo docs. For the rest, Apollo 2 is awesome!!

It is still under construction, I think (-: