apollographql / meteor-integration

🚀 meteor add apollo
http://dev.apollodata.com/core/meteor.html
108 stars 45 forks source link

Allow to extend Apollo Client and network interface config, more tests (client config, query deduplication) #70

Closed xavxyz closed 7 years ago

xavxyz commented 7 years ago

It's me again! 😄

Query deduplication can be pretty handy, I've thought it would be a good thing to offer Meteor developers using this package to set deduplication option up.

I believe this open the door to a new way to configure the Apollo Client via the Meteor apollo package, given all the params an Apollo Client instance accepts.

I see especially two types of config:

We could have two types of default config, the defaultNetworkInterfaceConfig and defaultClientOptions? Or maybe everything in the same object?

I don't know what would be the easiest and the most useful for Meteor folks. What do you think?

lorensr commented 7 years ago

Two objects I think.

So should we change the API from:

meteorClientConfig(networkInterfaceConfig)

to:

meteorClientConfig(clientConfig)

and clientConfig can take any Apollo Client options plus networkInterfaceConfig? Which would be overwritten if clientConfig.networkInterface were included?

And we can explain what defaults we use

xavxyz commented 7 years ago

Yep totally!

lorensr commented 7 years ago

Want to do that to this PR & docs changes? Or separately?

xavxyz commented 7 years ago

I'll do the modifications on this one 👍

xavxyz commented 7 years ago

yay

💃

And it's working on the starter-kit 🆗