apollographql/apollo-link

Error Object doesn't support property or method 'of' @client queries IE <= 10

Opened this issue · 0 comments

Expected Behavior
fetch data via @client queries should bring data from the server on IE <= 10

Actual Behavior
When trying to fetch @client queries on IE 10 and below I get a client side error getting Object doesn't support property or method 'of', this only happens with client queries, the error is not visible on the developer console unless you explicitly log the error inside the Query render method (it's been swallowed)
when debugging I can follow the trace to this method:

    QueryManager.prototype.getObservableFromLink = function (query, context, variables, deduplication) {
        var _this = this;
        if (deduplication === void 0) { deduplication = this.queryDeduplication; }
        var observable;
        var serverQuery = this.transform(query).serverQuery;
        if (serverQuery) {
           // not related
        else {
            // This one throws the error!!!
            observable = Observable.of({ data: {} });
            context = this.prepareContext(context);
        }
        var clientQuery = this.transform(query).clientQuery;
        if (clientQuery) {
            observable = asyncMap(observable, function (result) {
                return _this.localState.runResolvers({
                    document: clientQuery,
                    remoteResult: result,
                    context: context,
                    variables: variables,
                });
            });
        }
        return observable;
    };

Screenshot 2019-07-16 at 16 51 15