Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
new MockLink(() => Observable.of(data)),
]);
const mock2 = new MockLink((op, forward) =>
Observable.of({ data: op.getContext().add }),
);
return new ApolloLink((operation, forward) => {
return (
firstLink.request(operation, op => {
return nextLink.request(op, forward) || Observable.of();
}) || Observable.of()
);
});
}
return (firstLink.request(operation, function (op) {
return nextLink.request(op, forward) || Observable.of();
}) || Observable.of());
});
function passthrough(op, forward) {
return forward ? forward(op) : Observable.of();
}
return new ApolloLink(() => Observable.of());
}
function passthrough(op, forward) {
return forward ? forward(op) : Observable.of();
}
function toLink(handler) {
export function execute(
link: ApolloLink,
operation: GraphQLRequest,
): Observable {
return (
link.request(
createOperation(
operation.context,
transformOperation(validateOperation(operation)),
),
) || Observable.of()
);
}
function execute(link, operation) {
return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of());
}
return new ApolloLink(function () { return Observable.of(); });
}