Last active
February 1, 2023 15:11
-
-
Save drewbaker/196f2e7816d0fa6229243f316c41525d to your computer and use it in GitHub Desktop.
This is used to generate the mock-api.json file used by fuxt
This file contains hidden or 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
query MockApi { | |
home: page(id: "/featured", idType: URI) { | |
id | |
title | |
excerpt | |
content | |
uri | |
featuredImage { | |
node { | |
...MediaImage | |
} | |
} | |
} | |
featured: page(id: "/featured", idType: URI) { | |
id | |
title | |
uri | |
children { | |
nodes { | |
id | |
... on Page { | |
...PageDeatil | |
} | |
} | |
} | |
} | |
directors: page(id: "/directors", idType: URI) { | |
id | |
title | |
uri | |
children { | |
nodes { | |
id | |
... on Page { | |
...PageDeatil | |
} | |
} | |
} | |
} | |
posts { | |
nodes { | |
id | |
title | |
uri | |
excerpt | |
content | |
featuredImage { | |
node { | |
...MediaImage | |
} | |
} | |
} | |
} | |
images: mediaItems(where: {orderby: {field: DATE, order: DESC}}) { | |
nodes { | |
...MediaImage | |
} | |
} | |
logos: mediaItems(where: {orderby: {field: DATE, order: DESC}}) { | |
nodes { | |
id | |
# Replace the URLs manually until we can where: for SVGs only | |
sourceUrl | |
} | |
} | |
menu(id: "Main Menu", idType: NAME) { | |
id | |
name | |
menuItems { | |
nodes { | |
...MenuItem | |
} | |
} | |
} | |
} | |
fragment MediaImage on MediaItem { | |
sourceUrl(size: FULLSCREEN_XLARGE) | |
sizes(size: FULLSCREEN_XLARGE) | |
srcSet(size: FULLSCREEN_XLARGE) | |
src: sourceUrl(size: FULLSCREEN_SMALL) | |
id | |
databaseId | |
title | |
altText | |
caption | |
mediaDetails { | |
height | |
width | |
} | |
imageMeta { | |
videoUrl | |
primaryColor | |
focalPointX | |
focalPointY | |
blurhash | |
} | |
} | |
fragment PageDeatil on Page { | |
id | |
title | |
content | |
excerpt | |
uri | |
acfPageMeta { | |
videoUrl | |
} | |
featuredImage { | |
node { | |
...MediaImage | |
} | |
} | |
} | |
fragment MenuItem on MenuItem { | |
label | |
cssClasses | |
target | |
url | |
id | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment