Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Query.prototype.extractOptsFromProps = function (props) {
this.operation = reactCommon.parser(props.query);
process.env.NODE_ENV === "production" ? tsInvariant.invariant(this.operation.type === reactCommon.DocumentType.Query) : tsInvariant.invariant(this.operation.type === reactCommon.DocumentType.Query, "The component requires a graphql query, but got a " + (this.operation.type === reactCommon.DocumentType.Mutation
? 'mutation'
: 'subscription') + ".");
var displayName = props.displayName || 'Query';
return tslib.__assign({}, props, { displayName: displayName, context: props.context || {}, metadata: { reactComponent: { displayName: displayName } } });
};
Query.prototype.initializeObservableQuery = function (client, props, context) {