Remove unused variable, make linter happy

This commit is contained in:
Christian Cueni 2021-11-23 07:17:51 +01:00
parent ca82a080d1
commit 00ae2a4cf2
2 changed files with 10 additions and 14 deletions

View File

@ -37,8 +37,8 @@ export const resolvers = {
deleteModuleNodes: (_, _query, {cache}) => {
Object.keys(cache.data.data)
.filter(prop => prop.indexOf('ModuleNode:') === 0)
.map(moduleName => cache.data.delete(moduleName)); // v3 uses .evict{id, fieldname}
return {success: true}
.map(moduleName => cache.data.delete(moduleName)); // v3 uses .evict{id, fieldname}
return {success: true};
},
},
};

View File

@ -2,7 +2,7 @@ import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
import UPDATE_USER_SETTING from '@/graphql/gql/mutations/updateUserSetting.gql';
import MY_SCHOOL_CLASS_QUERY from '@/graphql/gql/queries/mySchoolClass.gql';
import DELETE_MODULE_NODES from '@/graphql/gql/local/mutations/deleteModuleNodes.gql';
import MODULE_DETAILS_QUERY from "@/graphql/gql/queries/modules/moduleDetailsQuery.gql";
import MODULE_DETAILS_QUERY from '@/graphql/gql/queries/modules/moduleDetailsQuery.gql';
export default {
methods: {
@ -23,21 +23,17 @@ export default {
store.writeQuery({query: ME_QUERY, data: meData});
innerApollo.mutate({
mutation: DELETE_MODULE_NODES,
variables: {
test: '',
}
})
mutation: DELETE_MODULE_NODES
});
},
refetchQueries: [{
query: MY_SCHOOL_CLASS_QUERY
}, {
query: MODULE_DETAILS_QUERY,
variables: {
slug: this.$route.params.slug
}
}]
query: MODULE_DETAILS_QUERY,
variables: {
slug: this.$route.params.slug
}
}]
}).catch((error) => {
console.warn('failed to update selected class', error);
});