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 {
|
||||
id
|
||||
title
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
fragment ContentBlockInterfaceParts on ContentBlockInterface {
|
||||
id
|
||||
title
|
||||
type
|
||||
contents
|
||||
__typename
|
||||
}
|
||||
|
|
@ -1,9 +1,5 @@
|
|||
fragment ContentBlockParts on ContentBlockNode {
|
||||
id
|
||||
slug
|
||||
title
|
||||
type
|
||||
contents
|
||||
userCreated
|
||||
mine
|
||||
bookmarks {
|
||||
|
|
@ -14,19 +10,12 @@ fragment ContentBlockParts on ContentBlockNode {
|
|||
}
|
||||
}
|
||||
hiddenFor {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
id
|
||||
name
|
||||
}
|
||||
visibleFor {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
id
|
||||
name
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||
#import "../fragments/contentBlockParts.gql"
|
||||
|
||||
mutation AddContentBlock($input: AddContentBlockInput!) {
|
||||
addContentBlock(input: $input) {
|
||||
newContentBlock {
|
||||
...ContentBlockParts
|
||||
...ContentBlockInterfaceParts
|
||||
}
|
||||
errors
|
||||
clientMutationId
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||
#import "../fragments/contentBlockParts.gql"
|
||||
|
||||
mutation MutateContentBlock($input: MutateContentBlockInput!) {
|
||||
mutateContentBlock(input: $input) {
|
||||
contentBlock {
|
||||
...ContentBlockParts
|
||||
...ContentBlockInterfaceParts
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
#import "../fragments/chapterParts.gql"
|
||||
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||
#import "../fragments/contentBlockParts.gql"
|
||||
|
||||
mutation UpdateChapterVisibility($input: UpdateChapterVisibilityInput!) {
|
||||
updateChapterVisibility(input: $input) {
|
||||
chapter {
|
||||
...ChapterParts
|
||||
contentBlocks {
|
||||
...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/contentBlockInterfaceParts.gql"
|
||||
#import "../fragments/contentBlockParts.gql"
|
||||
|
||||
query ChapterQuery($id: ID!) {
|
||||
chapter(id: $id) {
|
||||
...ChapterParts
|
||||
contentBlocks {
|
||||
...ContentBlockParts
|
||||
...ContentBlockInterfaceParts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#import "../fragments/contentBlockInterfaceParts.gql"
|
||||
#import "../fragments/contentBlockParts.gql"
|
||||
query ContentBlockQuery($id: ID!) {
|
||||
contentBlock(id: $id) {
|
||||
...ContentBlockParts
|
||||
...ContentBlockInterfaceParts
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#import "../../fragments/objectiveGroupParts.gql"
|
||||
#import "../../fragments/objectiveParts.gql"
|
||||
#import "../../fragments/moduleParts.gql"
|
||||
#import "../../fragments/contentBlockInterfaceParts.gql"
|
||||
#import "../../fragments/contentBlockParts.gql"
|
||||
query ModuleDetailsQuery($slug: String!) {
|
||||
module(slug: $slug) {
|
||||
|
|
@ -33,6 +34,7 @@ query ModuleDetailsQuery($slug: String!) {
|
|||
node {
|
||||
...ChapterParts
|
||||
contentBlocks {
|
||||
...ContentBlockInterfaceParts
|
||||
...ContentBlockParts
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
#import "../../fragments/contentBlockInterfaceParts.gql"
|
||||
|
||||
|
||||
query SnapshotDetail($id: ID!) {
|
||||
snapshot(id: $id) {
|
||||
id
|
||||
title
|
||||
metaTitle
|
||||
heroImage
|
||||
chapters {
|
||||
id
|
||||
description
|
||||
|
|
@ -8,7 +14,8 @@ query SnapshotDetail($id: ID!) {
|
|||
titleHidden
|
||||
descriptionHidden
|
||||
contentBlocks {
|
||||
id
|
||||
...ContentBlockInterfaceParts
|
||||
hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue