-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from vernaillen/replace-schema
Allow user to replace schema
- Loading branch information
Showing
6 changed files
with
1,556 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,316 @@ | ||
fragment ContentNode on ContentNode { | ||
# contentType | ||
contentTypeName | ||
databaseId | ||
date | ||
dateGmt | ||
desiredSlug | ||
# editingLockedBy | ||
enclosure | ||
# enqueuedScripts | ||
# enqueuedStylesheets | ||
guid | ||
id | ||
isContentNode | ||
isPreview | ||
isRestricted | ||
isTermNode | ||
# lastEditedBy | ||
link | ||
modified | ||
modifiedGmt | ||
previewRevisionDatabaseId | ||
previewRevisionId | ||
slug | ||
status | ||
# template | ||
uri | ||
} | ||
fragment CoreGallery on CoreGallery { | ||
...EditorBlock | ||
innerBlocks { | ||
...CoreImage | ||
} | ||
} | ||
fragment CoreImage on CoreImage { | ||
...EditorBlock | ||
attributes { | ||
align | ||
alt | ||
anchor | ||
aspectRatio | ||
borderColor | ||
caption | ||
className | ||
cssClassName | ||
height | ||
href | ||
id | ||
linkClass | ||
linkDestination | ||
linkTarget | ||
lock | ||
rel | ||
scale | ||
sizeSlug | ||
src | ||
style | ||
title | ||
url | ||
width | ||
} | ||
} | ||
fragment CoreParagraph on CoreParagraph { | ||
...EditorBlock | ||
attributes { | ||
content | ||
} | ||
} | ||
fragment CoreQuote on CoreQuote { | ||
...EditorBlock | ||
} | ||
fragment EditorBlock on EditorBlock { | ||
apiVersion | ||
blockEditorCategoryName | ||
clientId | ||
cssClassNames | ||
isDynamic | ||
name | ||
parentClientId | ||
renderedHtml | ||
} | ||
fragment MediaItem on MediaItem { | ||
altText | ||
# ancestors | ||
# author | ||
authorDatabaseId | ||
authorId | ||
caption | ||
# children | ||
commentCount | ||
commentStatus | ||
# comments | ||
# contentType | ||
contentTypeName | ||
databaseId | ||
date | ||
dateGmt | ||
description | ||
desiredSlug | ||
# editingLockedBy | ||
enclosure | ||
# enqueuedScripts | ||
# enqueuedStylesheets | ||
fileSize | ||
guid | ||
id | ||
isContentNode | ||
isPreview | ||
isRestricted | ||
isTermNode | ||
# lastEditedBy | ||
link | ||
# mediaDetails | ||
mediaItemId | ||
mediaItemUrl | ||
mediaType | ||
mimeType | ||
modified | ||
modifiedGmt | ||
# parent | ||
parentDatabaseId | ||
parentId | ||
previewRevisionDatabaseId | ||
previewRevisionId | ||
sizes | ||
slug | ||
sourceUrl | ||
srcSet | ||
status | ||
# template | ||
title | ||
uri | ||
} | ||
fragment NodeWithExcerpt on NodeWithExcerpt { | ||
excerpt | ||
id | ||
} | ||
fragment NodeWithFeaturedImage on NodeWithFeaturedImage { | ||
featuredImage { | ||
...NodeWithFeaturedImageToMediaItemConnectionEdge | ||
} | ||
featuredImageDatabaseId | ||
featuredImageId | ||
id | ||
} | ||
fragment NodeWithFeaturedImageToMediaItemConnectionEdge on NodeWithFeaturedImageToMediaItemConnectionEdge { | ||
cursor | ||
node { | ||
...MediaItem | ||
} | ||
} | ||
fragment Page on Page { | ||
...ContentNode | ||
content | ||
isFrontPage | ||
isPostsPage | ||
isPreview | ||
isPrivacyPage | ||
isRestricted | ||
isRevision | ||
title | ||
editorBlocks { | ||
name | ||
...CoreGallery | ||
...CoreImage | ||
...CoreParagraph | ||
...CoreQuote | ||
...EditorBlock | ||
} | ||
} | ||
fragment Post on Post { | ||
...ContentNode | ||
...NodeWithFeaturedImage | ||
content | ||
title | ||
editorBlocks { | ||
name | ||
...CoreGallery | ||
...CoreImage | ||
...CoreParagraph | ||
...CoreQuote | ||
...EditorBlock | ||
} | ||
} | ||
|
||
query Pages($limit: Int = 10) { | ||
pages(first: $limit) { | ||
nodes { | ||
...Page | ||
} | ||
} | ||
} | ||
query Posts($limit: Int = 10) { | ||
posts(first: $limit) { | ||
nodes { | ||
...Post | ||
...NodeWithExcerpt | ||
} | ||
} | ||
} | ||
query LatestPost { | ||
posts(first: 1) { | ||
nodes { | ||
...Post | ||
...NodeWithExcerpt | ||
} | ||
} | ||
} | ||
query PostByUri($uri: String!) { | ||
nodeByUri(uri: $uri) { | ||
...Page | ||
...Post | ||
} | ||
} | ||
query PostById($id: ID!, $asPreview: Boolean = false) { | ||
post(id: $id, idType: DATABASE_ID, asPreview: $asPreview) { | ||
...Post | ||
} | ||
} | ||
query PageById($id: ID!) { | ||
page(id: $id, idType: DATABASE_ID, asPreview: true) { | ||
...Page | ||
} | ||
} | ||
query Settings { | ||
generalSettings { | ||
title | ||
description | ||
url | ||
dateFormat | ||
language | ||
startOfWeek | ||
timezone | ||
timeFormat | ||
} | ||
} | ||
query Menu($name: ID! = "main", $idType: MenuNodeIdTypeEnum! = NAME) { | ||
menu(id: $name, idType: $idType) { | ||
id | ||
name | ||
menuItems { | ||
nodes { | ||
label | ||
uri | ||
} | ||
} | ||
} | ||
} | ||
query Viewer { | ||
viewer { | ||
username | ||
userId | ||
id | ||
description | ||
firstName | ||
lastName | ||
locale | ||
url | ||
uri | ||
} | ||
} | ||
query Revisions { | ||
revisions { | ||
nodes { | ||
date | ||
uri | ||
isPreview | ||
} | ||
} | ||
} | ||
|
||
fragment Page on Page { | ||
...ContentNode | ||
content | ||
isFrontPage | ||
isPostsPage | ||
isPreview | ||
isPrivacyPage | ||
isRestricted | ||
isRevision | ||
title | ||
editorBlocks { | ||
name | ||
...CoreGallery | ||
...CoreImage | ||
...CoreParagraph | ||
...CoreQuote | ||
...EditorBlock | ||
} | ||
seo { | ||
metaDesc | ||
title | ||
fullHead | ||
} | ||
} | ||
fragment Post on Post { | ||
...ContentNode | ||
...NodeWithFeaturedImage | ||
content | ||
title | ||
editorBlocks { | ||
name | ||
...CoreGallery | ||
...CoreImage | ||
...CoreParagraph | ||
...CoreQuote | ||
...EditorBlock | ||
} | ||
seo { | ||
metaDesc | ||
title | ||
fullHead | ||
} | ||
} |
Oops, something went wrong.