there is a call to Object.assign here
https://github.com/apollographql/apollo-client/blob/v1.1.1/src/queries/getFromAST.ts#L253
which breaks on IE
Thanks for the PR! I'll merge it as soon as you make it pass 馃檪
@helfer working on it
Could there be a better solution with instead:
Adding your own polyfill just contributes to the size + bloat, especially because id bet 99% either opt out of IE or apply their own polyfill (usually on window.Object or using babel)
@chaffeqa What's funny is that we use typescript from Microsoft, which compiles the code down to es5, but obviously doesn't transform Object.assign, so i doesn't work with IE, which is also from Microsoft 馃榿
Since we use typescript, also using babel doesn't really make sense. I don't know if typescript has a similar option to transform Object.assign, but even if it did, there are probably other things that are not supported by some browsers etc.
There are certain things we already have to polyfill (fetch for example), but we try to make the client as easy to use as possible, so the fewer polyfills, the better.
If there was a library that checked your code for things that are not supported in a common browser, that would be a really great thing to add to the tests though. Do you know of something like that?
derp I knew that, just didnt think to hard on the subject, was lost in a work issue this morning ><
So I looked quickly into the way you are distributing, and to me I would say:
srcnpm run compile:browser, add a browserify plugin (I know webpack, not browserify very well) or babel plugin (which I'm guessing browserify uses) that polyfills for youThat way you can keep the code clear of polyfills for those who install it into their own build (via npm) and they can polyfill on their own (which they probably do), but at the same time the CDN version can have the polyfills by default.