Skip to content

Commit

Permalink
temp: un-opt-out-able rendition set
Browse files Browse the repository at this point in the history
  • Loading branch information
hUwUtao committed Nov 28, 2024
1 parent d67628e commit 1cabf47
Show file tree
Hide file tree
Showing 5 changed files with 192 additions and 83 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@team-fuho/wt",
"version": "2.1.0",
"version": "2.1.1",
"description": "powered by `wagtail`. awesome!",
"type": "module",
"main": "dist/index.js",
Expand Down
27 changes: 17 additions & 10 deletions src/client.gql
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
fragment DefaultImageView on TFImage {
id
url
rendition(width: 1200, height: 630, format: "jpeg", jpegquality: 85) {
id
url
width
height
}
srcSet(sizes: [768, 1080], format: "webp")
width
height
}

fragment BlogPageOuterView on BlogPage {
id
slug
title
seoTitle
thumb {
id
rendition(width: 1920, height: 1080, format: "webp") {
id
url
}
...DefaultImageView
}
}

Expand All @@ -25,9 +35,7 @@ fragment BlogPageInnerView on BlogPage {
link
alignment
image {
url
width
height
...DefaultImageView
}
}
... on QuoteBlock {
Expand All @@ -45,8 +53,7 @@ fragment GalleryOuterView on Picture {
id
cap
image {
id
url
...DefaultImageView
}
imageDate
}
Expand Down
4 changes: 2 additions & 2 deletions src/graphql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import * as types from './graphql';
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
*/
const documents = {
"fragment BlogPageOuterView on BlogPage {\n id\n slug\n title\n seoTitle\n thumb {\n id\n rendition(width: 1920, height: 1080, format: \"webp\") {\n id\n url\n }\n }\n}\n\nfragment BlogPageInnerView on BlogPage {\n body {\n ... on StreamFieldInterface {\n blockType\n }\n ... on RichTextBlock {\n value\n }\n ... on ImageBlock {\n caption\n link\n alignment\n image {\n url\n width\n height\n }\n }\n ... on QuoteBlock {\n quote\n attribution\n }\n ... on HeadingBlock {\n text\n importance\n }\n }\n}\n\nfragment GalleryOuterView on Picture {\n id\n cap\n image {\n id\n url\n }\n imageDate\n}\n\nquery GalleryListView {\n pages(contentType: \"gallery.Picture\") {\n ...GalleryOuterView\n }\n}\n\nquery GalleryPaginatedListView($offset: PositiveInt, $limit: PositiveInt) {\n pages(contentType: \"gallery.Picture\", offset: $offset, limit: $limit) {\n ...GalleryOuterView\n }\n}\n\nquery BlogListView {\n pages(contentType: \"blog.BlogPage\") {\n ...BlogPageOuterView\n }\n}\n\nquery BlogPaginatedListView($offset: PositiveInt, $limit: PositiveInt) {\n pages(contentType: \"blog.BlogPage\", offset: $offset, limit: $limit) {\n ...BlogPageOuterView\n }\n}\n\nquery BlogPreviewView($token: String) {\n page(id: 0, token: $token) {\n ...BlogPageOuterView\n ...BlogPageInnerView\n }\n}\n\nquery BlogLiveView($slug: String) {\n page(slug: $slug) {\n ...BlogPageOuterView\n ...BlogPageInnerView\n }\n}": types.BlogPageOuterViewFragmentDoc,
"fragment DefaultImageView on TFImage {\n id\n url\n rendition(width: 1200, height: 630, format: \"jpeg\", jpegquality: 85) {\n id\n url\n width\n height\n }\n srcSet(sizes: [768, 1080], format: \"webp\")\n width\n height\n}\n\nfragment BlogPageOuterView on BlogPage {\n id\n slug\n title\n seoTitle\n thumb {\n ...DefaultImageView\n }\n}\n\nfragment BlogPageInnerView on BlogPage {\n body {\n ... on StreamFieldInterface {\n blockType\n }\n ... on RichTextBlock {\n value\n }\n ... on ImageBlock {\n caption\n link\n alignment\n image {\n ...DefaultImageView\n }\n }\n ... on QuoteBlock {\n quote\n attribution\n }\n ... on HeadingBlock {\n text\n importance\n }\n }\n}\n\nfragment GalleryOuterView on Picture {\n id\n cap\n image {\n ...DefaultImageView\n }\n imageDate\n}\n\nquery GalleryListView {\n pages(contentType: \"gallery.Picture\") {\n ...GalleryOuterView\n }\n}\n\nquery GalleryPaginatedListView($offset: PositiveInt, $limit: PositiveInt) {\n pages(contentType: \"gallery.Picture\", offset: $offset, limit: $limit) {\n ...GalleryOuterView\n }\n}\n\nquery BlogListView {\n pages(contentType: \"blog.BlogPage\") {\n ...BlogPageOuterView\n }\n}\n\nquery BlogPaginatedListView($offset: PositiveInt, $limit: PositiveInt) {\n pages(contentType: \"blog.BlogPage\", offset: $offset, limit: $limit) {\n ...BlogPageOuterView\n }\n}\n\nquery BlogPreviewView($token: String) {\n page(id: 0, token: $token) {\n ...BlogPageOuterView\n ...BlogPageInnerView\n }\n}\n\nquery BlogLiveView($slug: String) {\n page(slug: $slug) {\n ...BlogPageOuterView\n ...BlogPageInnerView\n }\n}": types.DefaultImageViewFragmentDoc,
};

/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "fragment BlogPageOuterView on BlogPage {\n id\n slug\n title\n seoTitle\n thumb {\n id\n rendition(width: 1920, height: 1080, format: \"webp\") {\n id\n url\n }\n }\n}\n\nfragment BlogPageInnerView on BlogPage {\n body {\n ... on StreamFieldInterface {\n blockType\n }\n ... on RichTextBlock {\n value\n }\n ... on ImageBlock {\n caption\n link\n alignment\n image {\n url\n width\n height\n }\n }\n ... on QuoteBlock {\n quote\n attribution\n }\n ... on HeadingBlock {\n text\n importance\n }\n }\n}\n\nfragment GalleryOuterView on Picture {\n id\n cap\n image {\n id\n url\n }\n imageDate\n}\n\nquery GalleryListView {\n pages(contentType: \"gallery.Picture\") {\n ...GalleryOuterView\n }\n}\n\nquery GalleryPaginatedListView($offset: PositiveInt, $limit: PositiveInt) {\n pages(contentType: \"gallery.Picture\", offset: $offset, limit: $limit) {\n ...GalleryOuterView\n }\n}\n\nquery BlogListView {\n pages(contentType: \"blog.BlogPage\") {\n ...BlogPageOuterView\n }\n}\n\nquery BlogPaginatedListView($offset: PositiveInt, $limit: PositiveInt) {\n pages(contentType: \"blog.BlogPage\", offset: $offset, limit: $limit) {\n ...BlogPageOuterView\n }\n}\n\nquery BlogPreviewView($token: String) {\n page(id: 0, token: $token) {\n ...BlogPageOuterView\n ...BlogPageInnerView\n }\n}\n\nquery BlogLiveView($slug: String) {\n page(slug: $slug) {\n ...BlogPageOuterView\n ...BlogPageInnerView\n }\n}"): typeof import('./graphql').BlogPageOuterViewFragmentDoc;
export function graphql(source: "fragment DefaultImageView on TFImage {\n id\n url\n rendition(width: 1200, height: 630, format: \"jpeg\", jpegquality: 85) {\n id\n url\n width\n height\n }\n srcSet(sizes: [768, 1080], format: \"webp\")\n width\n height\n}\n\nfragment BlogPageOuterView on BlogPage {\n id\n slug\n title\n seoTitle\n thumb {\n ...DefaultImageView\n }\n}\n\nfragment BlogPageInnerView on BlogPage {\n body {\n ... on StreamFieldInterface {\n blockType\n }\n ... on RichTextBlock {\n value\n }\n ... on ImageBlock {\n caption\n link\n alignment\n image {\n ...DefaultImageView\n }\n }\n ... on QuoteBlock {\n quote\n attribution\n }\n ... on HeadingBlock {\n text\n importance\n }\n }\n}\n\nfragment GalleryOuterView on Picture {\n id\n cap\n image {\n ...DefaultImageView\n }\n imageDate\n}\n\nquery GalleryListView {\n pages(contentType: \"gallery.Picture\") {\n ...GalleryOuterView\n }\n}\n\nquery GalleryPaginatedListView($offset: PositiveInt, $limit: PositiveInt) {\n pages(contentType: \"gallery.Picture\", offset: $offset, limit: $limit) {\n ...GalleryOuterView\n }\n}\n\nquery BlogListView {\n pages(contentType: \"blog.BlogPage\") {\n ...BlogPageOuterView\n }\n}\n\nquery BlogPaginatedListView($offset: PositiveInt, $limit: PositiveInt) {\n pages(contentType: \"blog.BlogPage\", offset: $offset, limit: $limit) {\n ...BlogPageOuterView\n }\n}\n\nquery BlogPreviewView($token: String) {\n page(id: 0, token: $token) {\n ...BlogPageOuterView\n ...BlogPageInnerView\n }\n}\n\nquery BlogLiveView($slug: String) {\n page(slug: $slug) {\n ...BlogPageOuterView\n ...BlogPageInnerView\n }\n}"): typeof import('./graphql').DefaultImageViewFragmentDoc;


export function graphql(source: string) {
Expand Down
Loading

0 comments on commit 1cabf47

Please sign in to comment.