Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
exports.GraphQLContext.prototype = Object.assign({}, common, {
createCache: function() {
return common.createCache
.call(this)
.restore(global[constants.APOLLO_STATE]);
},
getIntrospectionResult: function() {
return global[constants.APOLLO_IQRD];
},
});
exports.contextDefinition = exports.GraphQLContext;
exports.createContext = hopsReact.combineContexts(
hopsReact.ReactContext,
exports.GraphQLContext
);
exports.graphqlExtension = function(config) {
return {
context: exports.GraphQLContext,
config: {
graphql: config,
},
};
};
]),
});
}.bind(this)
);
},
prefetchData: function(rootElement) {
return process.env.HOPS_MODE !== 'static'
? ReactApollo.getDataFromTree(rootElement)
: Promise.resolve();
},
});
exports.contextDefinition = exports.GraphQLContext;
exports.createContext = hopsReact.combineContexts(
hopsReact.ReactContext,
exports.GraphQLContext
);
exports.graphqlExtension = function(config) {
return {
context: exports.GraphQLContext,
config: {
graphql: config,
},
};
};