Split content block fragment into multiple parts
This commit is contained in:
parent
09566f1193
commit
ca549e93e5
|
|
@ -1,4 +1,3 @@
|
||||||
#import "./contentBlockParts.gql"
|
|
||||||
fragment ChapterParts on ChapterNode {
|
fragment ChapterParts on ChapterNode {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fragment ContentBlockInterfaceParts on ContentBlockInterface {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
type
|
||||||
|
contents
|
||||||
|
__typename
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
fragment ContentBlockParts on ContentBlockNode {
|
fragment ContentBlockParts on ContentBlockNode {
|
||||||
id
|
|
||||||
slug
|
slug
|
||||||
title
|
|
||||||
type
|
|
||||||
contents
|
|
||||||
userCreated
|
userCreated
|
||||||
mine
|
mine
|
||||||
bookmarks {
|
bookmarks {
|
||||||
|
|
@ -14,19 +10,12 @@ fragment ContentBlockParts on ContentBlockNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hiddenFor {
|
hiddenFor {
|
||||||
edges {
|
id
|
||||||
node {
|
name
|
||||||
id
|
|
||||||
name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
visibleFor {
|
visibleFor {
|
||||||
edges {
|
id
|
||||||
node {
|
name
|
||||||
id
|
|
||||||
name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
|
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||||
#import "../fragments/contentBlockParts.gql"
|
#import "../fragments/contentBlockParts.gql"
|
||||||
|
|
||||||
mutation AddContentBlock($input: AddContentBlockInput!) {
|
mutation AddContentBlock($input: AddContentBlockInput!) {
|
||||||
addContentBlock(input: $input) {
|
addContentBlock(input: $input) {
|
||||||
newContentBlock {
|
newContentBlock {
|
||||||
...ContentBlockParts
|
...ContentBlockParts
|
||||||
|
...ContentBlockInterfaceParts
|
||||||
}
|
}
|
||||||
errors
|
errors
|
||||||
clientMutationId
|
clientMutationId
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
|
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||||
#import "../fragments/contentBlockParts.gql"
|
#import "../fragments/contentBlockParts.gql"
|
||||||
|
|
||||||
mutation MutateContentBlock($input: MutateContentBlockInput!) {
|
mutation MutateContentBlock($input: MutateContentBlockInput!) {
|
||||||
mutateContentBlock(input: $input) {
|
mutateContentBlock(input: $input) {
|
||||||
contentBlock {
|
contentBlock {
|
||||||
...ContentBlockParts
|
...ContentBlockParts
|
||||||
|
...ContentBlockInterfaceParts
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
#import "../fragments/chapterParts.gql"
|
#import "../fragments/chapterParts.gql"
|
||||||
|
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||||
#import "../fragments/contentBlockParts.gql"
|
#import "../fragments/contentBlockParts.gql"
|
||||||
|
|
||||||
mutation UpdateChapterVisibility($input: UpdateChapterVisibilityInput!) {
|
mutation UpdateChapterVisibility($input: UpdateChapterVisibilityInput!) {
|
||||||
updateChapterVisibility(input: $input) {
|
updateChapterVisibility(input: $input) {
|
||||||
chapter {
|
chapter {
|
||||||
...ChapterParts
|
...ChapterParts
|
||||||
contentBlocks {
|
contentBlocks {
|
||||||
...ContentBlockParts
|
...ContentBlockParts
|
||||||
|
...ContentBlockInterfaceParts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
# to be read from cache only
|
|
||||||
#import "../fragments/contentBlockParts.gql"
|
|
||||||
query ContentBlockQuery {
|
|
||||||
contentBlocks {
|
|
||||||
...ContentBlockParts
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
#import "../fragments/chapterParts.gql"
|
#import "../fragments/chapterParts.gql"
|
||||||
|
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||||
#import "../fragments/contentBlockParts.gql"
|
#import "../fragments/contentBlockParts.gql"
|
||||||
|
|
||||||
query ChapterQuery($id: ID!) {
|
query ChapterQuery($id: ID!) {
|
||||||
chapter(id: $id) {
|
chapter(id: $id) {
|
||||||
...ChapterParts
|
...ChapterParts
|
||||||
contentBlocks {
|
contentBlocks {
|
||||||
...ContentBlockParts
|
...ContentBlockParts
|
||||||
|
...ContentBlockInterfaceParts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||||
#import "../fragments/contentBlockParts.gql"
|
#import "../fragments/contentBlockParts.gql"
|
||||||
query ContentBlockQuery($id: ID!) {
|
query ContentBlockQuery($id: ID!) {
|
||||||
contentBlock(id: $id) {
|
contentBlock(id: $id) {
|
||||||
...ContentBlockParts
|
...ContentBlockParts
|
||||||
|
...ContentBlockInterfaceParts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#import "../../fragments/objectiveGroupParts.gql"
|
#import "../../fragments/objectiveGroupParts.gql"
|
||||||
#import "../../fragments/objectiveParts.gql"
|
#import "../../fragments/objectiveParts.gql"
|
||||||
#import "../../fragments/moduleParts.gql"
|
#import "../../fragments/moduleParts.gql"
|
||||||
|
#import "../../fragments/contentBlockInterfaceParts.gql"
|
||||||
#import "../../fragments/contentBlockParts.gql"
|
#import "../../fragments/contentBlockParts.gql"
|
||||||
query ModuleDetailsQuery($slug: String!) {
|
query ModuleDetailsQuery($slug: String!) {
|
||||||
module(slug: $slug) {
|
module(slug: $slug) {
|
||||||
|
|
@ -33,6 +34,7 @@ query ModuleDetailsQuery($slug: String!) {
|
||||||
node {
|
node {
|
||||||
...ChapterParts
|
...ChapterParts
|
||||||
contentBlocks {
|
contentBlocks {
|
||||||
|
...ContentBlockInterfaceParts
|
||||||
...ContentBlockParts
|
...ContentBlockParts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
|
#import "../../fragments/contentBlockInterfaceParts.gql"
|
||||||
|
|
||||||
|
|
||||||
query SnapshotDetail($id: ID!) {
|
query SnapshotDetail($id: ID!) {
|
||||||
snapshot(id: $id) {
|
snapshot(id: $id) {
|
||||||
id
|
id
|
||||||
|
title
|
||||||
|
metaTitle
|
||||||
|
heroImage
|
||||||
chapters {
|
chapters {
|
||||||
id
|
id
|
||||||
description
|
description
|
||||||
|
|
@ -8,7 +14,8 @@ query SnapshotDetail($id: ID!) {
|
||||||
titleHidden
|
titleHidden
|
||||||
descriptionHidden
|
descriptionHidden
|
||||||
contentBlocks {
|
contentBlocks {
|
||||||
id
|
...ContentBlockInterfaceParts
|
||||||
|
hidden
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue