This commit is contained in:
2024-05-21 00:12:19 +02:00
parent 9e0466f78b
commit 963987278a
22 changed files with 1025 additions and 90 deletions
+46
View File
@@ -0,0 +1,46 @@
import { graphql } from "@/gql";
import { NewsFragment } from "@/gql/graphql";
export type { NewsFragment, NewsIndexFragment } from "@/gql/graphql";
const NewsFragmentDefinition = graphql(`
fragment News on NewsPage {
__typename
id
slug
title
firstPublishedAt
excerpt
featuredImage {
...Image
}
body {
...Blocks
}
}
`);
const NewsIndexFragmentDefinition = graphql(`
fragment NewsIndex on NewsIndex {
__typename
id
slug
title
lead
}
`);
export const newsQuery = graphql(`
query news {
index: newsIndex {
... on NewsIndex {
...NewsIndex
}
}
news: pages(contentType: "news.NewsPage") {
... on NewsPage {
...News
}
}
}
`);