Instructions for getting graphql-request to work with IE10/11
Hi!
I'm using graphql-request for a small app which now (sadly) has to support IE10 and IE11.
I used several obvious polyfills (es6-promise, es6-object-assign etc.) but couldn't get requests and their handling to fully work. That's why I ended up using babel-polyfill which handles applying needed polyfills automatically.
As it bloats the resulting JS with a lot of possibly unneeded polyfills I wanted to ask you guys if you could provide a list of needed polyfills for IE10 and IE11 which could be added to the docs.
Thanks in advance.
I have the same problem. I can send request, but can't get the response. My browser is safari of iphone5s.
Would somebody be interested in contributing a "compatibility mode" as described in #22?
Can you check whether 1.4.0 works for you @mwld @LiuGabi?
With 1.4.0 in IE10 I get SCRIPT5009: 'Promise' is undefined.
After adding these lines:
var Promise = require('promise-polyfill');
if (!window.Promise) {
window.Promise = Promise;
}
require('es6-object-assign').polyfill();
...it may work in some cases but I get a CORS error in my particular case, but only in IE10 (not Chrome or Firefox), which is what I'm aiming to be able to support :
SEC7118: XMLHttpRequest for https://api.graphcms.com/simple/v1/c1 required Cross Origin Resource Sharing (CORS).
SEC7119: XMLHttpRequest for https://api.graphcms.com/simple/v1/c1 required CORS preflight.
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.
Possible Unhandled Promise Rejection:TypeError: Network request failed