Clean up graphql definitions
This commit is contained in:
parent
04c850753f
commit
1462b08ecd
|
|
@ -92,9 +92,7 @@ export default {
|
|||
id: getModuleId(),
|
||||
}),
|
||||
TopicNode: () => ({
|
||||
modules: {
|
||||
edges: [],
|
||||
},
|
||||
modules: [],
|
||||
}),
|
||||
RoomNode: () => ({
|
||||
title: 'A Room',
|
||||
|
|
|
|||
|
|
@ -1,5 +1,23 @@
|
|||
describe('Create Content Block', () => {
|
||||
it('visits the page', () => {
|
||||
cy.visit();
|
||||
// todo:
|
||||
// add mocks
|
||||
// cy.visit('/module/some-module/add/bliblablub');
|
||||
// add title
|
||||
// add text element
|
||||
// add list item
|
||||
// add text element to list item
|
||||
// add second list item
|
||||
// add text element to second list item
|
||||
// add another text element to second list item
|
||||
// save
|
||||
|
||||
// another test
|
||||
// go to pase
|
||||
// click cancel, go back
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// todo: another test
|
||||
// edit existing content block
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@
|
|||
apollo: {
|
||||
schoolClass: {
|
||||
query: MY_SCHOOL_CLASS_QUERY,
|
||||
update(data) {
|
||||
return this.$getRidOfEdges(data).me.selectedClass;
|
||||
update({me: {selectedClass}}) {
|
||||
return selectedClass;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
#import "../fragments/assignmentParts.gql"
|
||||
query AssignmentsQuery {
|
||||
assignments {
|
||||
edges {
|
||||
node {
|
||||
...AssignmentParts
|
||||
}
|
||||
}
|
||||
...AssignmentParts
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@ query ModuleDetailsQuery($slug: String, $id: ID) {
|
|||
module(slug: $slug, id: $id) {
|
||||
...ModuleParts
|
||||
assignments {
|
||||
edges {
|
||||
node {
|
||||
...AssignmentParts
|
||||
}
|
||||
}
|
||||
...AssignmentParts
|
||||
}
|
||||
objectiveGroups {
|
||||
...ObjectiveGroupParts
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
query NewsTeasers {
|
||||
newsTeasers {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
description
|
||||
title
|
||||
imageUrl
|
||||
newsArticleUrl
|
||||
displayDate
|
||||
imageSource
|
||||
}
|
||||
}
|
||||
}
|
||||
newsTeasers {
|
||||
id
|
||||
description
|
||||
title
|
||||
imageUrl
|
||||
newsArticleUrl
|
||||
displayDate
|
||||
imageSource
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ export function moduleQuery() {
|
|||
variables: {
|
||||
slug: this.$route.params.slug
|
||||
},
|
||||
update({module}) {
|
||||
return this.$getRidOfEdges(module) || {};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ export default {
|
|||
apollo: {
|
||||
newsTeasers: {
|
||||
query: NEWS_TEASER_QUERY,
|
||||
update(data) {
|
||||
return this.$getRidOfEdges(data).newsTeasers;
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,9 +42,6 @@
|
|||
variables: {
|
||||
slug: this.$route.params.slug,
|
||||
},
|
||||
update(data) {
|
||||
return this.$getRidOfEdges(data).module || {};
|
||||
},
|
||||
result({data: {module: {id}}}) {
|
||||
if (!this.updateSent) {
|
||||
this.$log.debug(`=== updating result for module ${id} ===`);
|
||||
|
|
|
|||
|
|
@ -80,5 +80,5 @@
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/_room.scss";
|
||||
@import "~styles/_room.scss";
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue