Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
query() {
return {
...ApolloQuery.apollo.query(),
query() {
return this.$data.query;
},
variables() {
return this.$data.variables;
},
skip: false,
fetchPolicy: 'cache-only',
result(result) {
const { errors, loading, networkStatus } = result;
let { error } = result;
result = Object.assign({}, result);
if (errors && errors.length) {
error = new Error(`Apollo errors occured (${errors.length})`);
error.graphQLErrors = errors;