add support for previewing pages

This commit is contained in:
2026-05-19 17:48:33 +02:00
parent f91c67f526
commit a5ebb897f1
25 changed files with 471 additions and 67 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
GRAPHQL_ENDPOINT=https://cms.neuf.no/api/graphql/
WAGTAIL_BASE_URL=https://cms.neuf.no
URL=http://localhost:3000
+7 -1
View File
@@ -3,8 +3,14 @@ import { CodegenConfig } from "@graphql-codegen/cli";
import { loadEnvConfig } from "@next/env";
loadEnvConfig(process.cwd());
const wagtailBaseUrl = process.env.WAGTAIL_BASE_URL;
if (!wagtailBaseUrl) {
throw new Error("WAGTAIL_BASE_URL is not set");
}
const graphqlEndpoint = `${wagtailBaseUrl.replace(/\/$/, "")}/api/graphql/`;
const config: CodegenConfig = {
schema: process.env.GRAPHQL_ENDPOINT,
schema: graphqlEndpoint,
documents: ["src/**/*.tsx", "src/**/*.ts"],
ignoreNoDocuments: true, // for better experience with the watcher
generates: {
+7
View File
@@ -0,0 +1,7 @@
import { cookies, draftMode } from "next/headers";
export async function POST() {
(await draftMode()).disable();
(await cookies()).delete("preview-token");
return new Response(null, { status: 204 });
}
+25
View File
@@ -0,0 +1,25 @@
import { cookies, draftMode } from "next/headers";
import { redirect } from "next/navigation";
import { NextRequest } from "next/server";
// Wagtail-headless-preview directs the editor's preview iframe here with
// ?content_type=app.Model&token=<signed>. We stash the token in a cookie,
// enable Next.js draft mode, and redirect to the type-dispatching renderer.
export async function GET(req: NextRequest) {
const token = req.nextUrl.searchParams.get("token");
const contentType = req.nextUrl.searchParams.get("content_type");
if (!token || !contentType) {
return new Response("missing token/content_type", { status: 400 });
}
(await draftMode()).enable();
(await cookies()).set("preview-token", token, {
httpOnly: true,
sameSite: "lax",
secure: process.env.NODE_ENV === "production",
maxAge: 60 * 60 * 24,
path: "/",
});
redirect("/preview/render");
}
+7 -1
View File
@@ -3,9 +3,15 @@ import "server-only";
import { cacheExchange, createClient, fetchExchange } from "@urql/core";
import { registerUrql } from "@urql/next/rsc";
const wagtailBaseUrl = process.env.WAGTAIL_BASE_URL;
if (!wagtailBaseUrl) {
throw new Error("WAGTAIL_BASE_URL is not set");
}
const graphqlEndpoint = `${wagtailBaseUrl.replace(/\/$/, "")}/api/graphql/`;
const makeClient = () => {
return createClient({
url: process.env.GRAPHQL_ENDPOINT ?? "",
url: graphqlEndpoint,
exchanges: [cacheExchange, fetchExchange],
// requestPolicy: "network-only",
fetchOptions: { next: { revalidate: 0 } },
+5 -1
View File
@@ -1,7 +1,9 @@
import "@/css/main.scss";
import { Header } from "@/components/layout/Header";
import { Footer } from "@/components/layout/Footer";
import { PreviewBanner } from "@/components/general/PreviewBanner";
import { Metadata } from "next";
import { draftMode } from "next/headers";
import { NuqsAdapter } from "nuqs/adapters/next/app";
const baseUrlMetadata = process.env.URL
@@ -26,11 +28,12 @@ export const metadata: Metadata = {
...baseUrlMetadata,
};
export default function RootLayout({
export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const isPreview = (await draftMode()).isEnabled;
return (
<html lang="no">
<head>
@@ -44,6 +47,7 @@ export default function RootLayout({
)}
</head>
<body>
{isPreview && <PreviewBanner />}
<NuqsAdapter>
<Header />
{children}
+191
View File
@@ -0,0 +1,191 @@
import { cookies } from "next/headers";
import { getClient } from "@/app/client";
import { graphql } from "@/gql";
import {
AssociationFragment,
AssociationIndexFragment,
ContactIndexFragment,
EventFragment,
GenericFragment,
HomeFragment,
NewsFragment,
NewsIndexFragment,
SponsorsPageFragment,
StudioFragment,
VenueFragment,
VenueIndexFragment,
VenueRentalIndexFragment,
} from "@/gql/graphql";
import {
AssociationIndexView,
allAssociationsQuery,
} from "@/components/associations/AssociationIndexView";
import { AssociationPageView } from "@/components/associations/AssociationPageView";
import { ContactIndexView } from "@/components/contact/ContactIndexView";
import { EventIndexView } from "@/components/events/EventIndexView";
import { EventPageView } from "@/components/events/EventPageView";
import { GenericPageView } from "@/components/general/GenericPageView";
import { HomePageView, homeQuery } from "@/components/home/HomePageView";
import { NewsIndexView } from "@/components/news/NewsIndexView";
import { NewsPageView } from "@/components/news/NewsPageView";
import { SponsorsPageView } from "@/components/sponsor/SponsorsPageView";
import { StudioPageView } from "@/components/studio/StudioPageView";
import {
VenueIndexView,
venueIndexQuery,
} from "@/components/venues/VenueIndexView";
import { VenuePageView } from "@/components/venues/VenuePageView";
import {
VenueRentalIndexView,
venueRentalIndexQuery,
} from "@/components/venues/VenueRentalIndexView";
import {
EventCategory,
EventOrganizer,
eventsOverviewQuery,
} from "@/lib/event";
import { newsQuery } from "@/lib/news";
export const dynamic = "force-dynamic";
export const revalidate = 0;
const previewPageQuery = graphql(`
query previewPage($token: String!) {
page: page(token: $token) {
__typename
... on GenericPage { ...Generic }
... on StudioPage { ...Studio }
... on SponsorsPage { ...SponsorsPage }
... on HomePage { ...Home }
... on EventPage { ...Event }
... on NewsPage { ...News }
... on AssociationPage { ...Association }
... on VenuePage { ...Venue }
... on NewsIndex { ...NewsIndex }
... on AssociationIndex { ...AssociationIndex }
... on VenueIndex { ...VenueIndex }
... on VenueRentalIndex { ...VenueRentalIndex }
... on ContactIndex { ...ContactIndex }
}
}
`);
function ExpiredPreview() {
return (
<main className="site-main" id="main">
<h1>Preview session expired</h1>
<p>Click Preview again in the Wagtail admin to start a new session.</p>
</main>
);
}
function UnsupportedType({ typename }: { typename: string }) {
return (
<main className="site-main" id="main">
<h1>Preview not available</h1>
<p>
Type <code>{typename}</code> cannot be previewed.
</p>
</main>
);
}
export default async function PreviewRender() {
const token = (await cookies()).get("preview-token")?.value;
if (!token) {
return <ExpiredPreview />;
}
const { data, error } = await getClient().query(previewPageQuery, { token });
if (error) {
throw new Error(error.message);
}
if (!data?.page) {
return <ExpiredPreview />;
}
const page = data.page;
switch (page.__typename) {
case "GenericPage":
return <GenericPageView page={page as GenericFragment} />;
case "StudioPage":
return <StudioPageView page={page as StudioFragment} />;
case "SponsorsPage":
return <SponsorsPageView page={page as SponsorsPageFragment} />;
case "EventPage":
return <EventPageView event={page as EventFragment} />;
case "NewsPage":
return <NewsPageView news={page as NewsFragment} />;
case "AssociationPage":
return <AssociationPageView association={page as AssociationFragment} />;
case "VenuePage":
return <VenuePageView venue={page as VenueFragment} />;
case "HomePage": {
const { data: aux } = await getClient().query(homeQuery, {});
const events = (aux?.events?.futureEvents ?? []) as EventFragment[];
const news = (aux?.news ?? []) as NewsFragment[];
return (
<HomePageView home={page as HomeFragment} events={events} news={news} />
);
}
case "EventIndex": {
const { data: aux } = await getClient().query(eventsOverviewQuery, {});
const events = (aux?.events?.futureEvents ?? []) as EventFragment[];
const eventCategories = (aux?.eventCategories ?? []) as EventCategory[];
const eventOrganizers = (aux?.eventOrganizers ?? []) as EventOrganizer[];
const venues = (aux?.venues ?? []) as VenueFragment[];
return (
<EventIndexView
events={events}
eventCategories={eventCategories}
eventOrganizers={eventOrganizers}
venues={venues}
/>
);
}
case "NewsIndex": {
const { data: aux } = await getClient().query(newsQuery, {});
const news = (aux?.news ?? []) as NewsFragment[];
return <NewsIndexView index={page as NewsIndexFragment} news={news} />;
}
case "AssociationIndex": {
const { data: aux } = await getClient().query(allAssociationsQuery, {});
const associations = (aux?.associations ?? []) as AssociationFragment[];
return (
<AssociationIndexView
index={page as AssociationIndexFragment}
associations={associations}
/>
);
}
case "VenueIndex": {
const { data: aux } = await getClient().query(venueIndexQuery, {});
const venues = (aux?.venues ?? []) as VenueFragment[];
return (
<VenueIndexView index={page as VenueIndexFragment} venues={venues} />
);
}
case "VenueRentalIndex": {
const { data: aux } = await getClient().query(venueRentalIndexQuery, {});
const venues = (aux?.venues ?? []) as VenueFragment[];
return (
<VenueRentalIndexView
index={page as VenueRentalIndexFragment}
venues={venues}
/>
);
}
case "ContactIndex":
return <ContactIndexView index={page as ContactIndexFragment} />;
default:
return <UnsupportedType typename={page.__typename ?? "unknown"} />;
}
}
@@ -0,0 +1,21 @@
"use client";
import styles from "./previewBanner.module.scss";
export function PreviewBanner() {
return (
<div className={styles.previewBanner} role="status">
<span className={styles.label}>Forhåndsvisning</span>
<button
type="button"
className="tertiary"
onClick={async () => {
await fetch("/api/preview/disable", { method: "POST" });
window.location.reload();
}}
>
Avslutt forhåndsvisning
</button>
</div>
);
}
@@ -0,0 +1,21 @@
.previewBanner {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 9999;
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--spacing-s);
padding: var(--spacing-xs) var(--spacing-s);
background: var(--color-deepBrick);
color: var(--color-betongGray);
font-family: var(--font-main-demi);
font-size: var(--font-size-caption);
}
.label {
text-transform: uppercase;
letter-spacing: 0.05em;
}
+24 -18
View File
@@ -19,8 +19,9 @@ type Documents = {
"\n query allEventSlugs {\n pages(contentType: \"events.EventPage\") {\n id\n slug\n }\n }\n ": typeof types.AllEventSlugsDocument,
"\n query allAssociationSlugs {\n pages(contentType: \"associations.AssociationPage\") {\n id\n slug\n }\n }\n ": typeof types.AllAssociationSlugsDocument,
"\n query allVenueSlugs {\n pages(contentType: \"venues.VenuePage\", limit: 100) {\n id\n slug\n }\n }\n ": typeof types.AllVenueSlugsDocument,
"\n query previewPage($token: String!) {\n page: page(token: $token) {\n __typename\n ... on GenericPage { ...Generic }\n ... on StudioPage { ...Studio }\n ... on SponsorsPage { ...SponsorsPage }\n ... on HomePage { ...Home }\n ... on EventPage { ...Event }\n ... on NewsPage { ...News }\n ... on AssociationPage { ...Association }\n ... on VenuePage { ...Venue }\n ... on NewsIndex { ...NewsIndex }\n ... on AssociationIndex { ...AssociationIndex }\n ... on VenueIndex { ...VenueIndex }\n ... on VenueRentalIndex { ...VenueRentalIndex }\n ... on ContactIndex { ...ContactIndex }\n }\n }\n": typeof types.PreviewPageDocument,
"\n query search($query: String) {\n results: search(query: $query) {\n __typename\n ... on PageInterface {\n slug\n }\n ... on NewsPage {\n id\n title\n }\n ... on EventPage {\n id\n title\n }\n ... on GenericPage {\n id\n title\n }\n ... on VenuePage {\n id\n title\n }\n ... on AssociationPage {\n id\n title\n associationType\n }\n }\n }\n ": typeof types.SearchDocument,
"\n fragment AssociationIndex on AssociationIndex {\n ... on AssociationIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": typeof types.AssociationIndexFragmentDoc,
"\n fragment AssociationIndex on AssociationIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n": typeof types.AssociationIndexFragmentDoc,
"\n fragment Association on AssociationPage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n excerpt\n lead\n body {\n ...Blocks\n }\n logo {\n url\n width\n height\n }\n associationType\n websiteUrl\n }\n": typeof types.AssociationFragmentDoc,
"\n query allAssociations {\n index: associationIndex {\n ... on AssociationIndex {\n ...AssociationIndex\n }\n }\n associations: pages(\n contentType: \"associations.AssociationPage\"\n limit: 1000\n ) {\n ... on AssociationPage {\n ...Association\n }\n }\n }\n": typeof types.AllAssociationsDocument,
"\n query associationBySlug($slug: String!) {\n association: page(\n contentType: \"associations.AssociationPage\"\n slug: $slug\n ) {\n ... on AssociationPage {\n ...Association\n }\n }\n }\n": typeof types.AssociationBySlugDocument,
@@ -38,24 +39,24 @@ type Documents = {
"\n fragment ImageWithTextBlock on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n": typeof types.ImageWithTextBlockFragmentDoc,
"\n fragment PageSectionBlock on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n id\n blockType\n }\n }\n": typeof types.PageSectionBlockFragmentDoc,
"\n fragment RichTextBlock on RichTextBlock {\n rawValue\n value\n }\n": typeof types.RichTextBlockFragmentDoc,
"\n fragment ContactIndex on ContactIndex {\n ... on ContactIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": typeof types.ContactIndexFragmentDoc,
"\n fragment ContactIndex on ContactIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n": typeof types.ContactIndexFragmentDoc,
"\n query contacts {\n index: contactIndex {\n ... on ContactIndex {\n ...ContactIndex\n }\n }\n }\n": typeof types.ContactsDocument,
"\n query eventBySlug($slug: String!) {\n event: page(contentType: \"events.EventPage\", slug: $slug) {\n ... on EventPage {\n ...Event\n }\n }\n }\n": typeof types.EventBySlugDocument,
"\n fragment Generic on GenericPage {\n __typename\n id\n urlPath\n seoTitle\n searchDescription\n title\n lead\n pig\n body {\n ...Blocks\n }\n }\n": typeof types.GenericFragmentDoc,
"\n query genericPageByUrl($urlPath: String!) {\n page: page(contentType: \"generic.GenericPage\", urlPath: $urlPath) {\n ... on GenericPage {\n ...Generic\n }\n }\n }\n": typeof types.GenericPageByUrlDocument,
"\n fragment Home on HomePage {\n ... on HomePage {\n featuredEvents {\n id\n }\n }\n }\n": typeof types.HomeFragmentDoc,
"\n fragment Home on HomePage {\n __typename\n featuredEvents {\n id\n }\n }\n": typeof types.HomeFragmentDoc,
"\n query home {\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n home: page(contentType: \"home.HomePage\", urlPath: \"/home/\") {\n ... on HomePage {\n ...Home\n }\n }\n news: pages(contentType: \"news.newsPage\", order: \"-first_published_at\", limit: 4) {\n ... on NewsPage {\n ...News\n }\n }\n }\n": typeof types.HomeDocument,
"\n query newsBySlug($slug: String!) {\n news: page(contentType: \"news.NewsPage\", slug: $slug) {\n ... on NewsPage {\n ...News\n }\n }\n }\n": typeof types.NewsBySlugDocument,
"\n fragment Sponsor on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n": typeof types.SponsorFragmentDoc,
"\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n }\n": typeof types.SponsorsPageFragmentDoc,
"\n fragment SponsorsPage on SponsorsPage {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n": typeof types.SponsorsPageFragmentDoc,
"\n query sponsors {\n page: sponsorsPage {\n ... on SponsorsPage {\n ...SponsorsPage\n }\n }\n }\n": typeof types.SponsorsDocument,
"\n fragment Studio on StudioPage {\n __typename\n id\n title\n seoTitle\n searchDescription\n lead\n pig\n logo {\n url\n width\n height\n alt\n }\n body {\n ...Blocks\n }\n }\n": typeof types.StudioFragmentDoc,
"\n query studio {\n page: studioPage {\n ... on StudioPage {\n ...Studio\n }\n }\n }\n": typeof types.StudioDocument,
"\n fragment VenueIndex on VenueIndex {\n ... on VenueIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": typeof types.VenueIndexFragmentDoc,
"\n fragment VenueIndex on VenueIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n": typeof types.VenueIndexFragmentDoc,
"\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n __typename\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n": typeof types.VenueFragmentDoc,
"\n query venueIndex {\n index: venueIndex {\n ... on VenueIndex {\n ...VenueIndex\n }\n }\n venues: pages(contentType: \"venues.VenuePage\", limit: 100) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": typeof types.VenueIndexDocument,
"\n query venueBySlug($slug: String!) {\n venue: page(contentType: \"venues.VenuePage\", slug: $slug) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": typeof types.VenueBySlugDocument,
"\n fragment VenueRentalIndex on VenueRentalIndex {\n ... on VenueRentalIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": typeof types.VenueRentalIndexFragmentDoc,
"\n fragment VenueRentalIndex on VenueRentalIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n": typeof types.VenueRentalIndexFragmentDoc,
"\n query venueRentalIndex {\n index: venueRentalIndex {\n ... on VenueRentalIndex {\n ...VenueRentalIndex\n }\n }\n venues: pages(contentType: \"venues.VenuePage\", limit: 100) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": typeof types.VenueRentalIndexDocument,
"\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n ...RichTextBlock\n }\n ... on ImageWithTextBlock {\n ...ImageWithTextBlock\n }\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n ... on HorizontalRuleBlock {\n ...HorizontalRuleBlock\n }\n ... on FeaturedBlock {\n ...FeaturedBlock\n }\n ... on ContactListBlock {\n ...ContactListBlock\n }\n ... on EmbedBlock {\n ...EmbedBlock\n }\n ... on FactBoxBlock {\n ...FactBoxBlock\n }\n }\n": typeof types.LeafBlocksFragmentDoc,
"\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...LeafBlocks\n }\n }\n }\n": typeof types.OneLevelOfBlocksFragmentDoc,
@@ -82,8 +83,9 @@ const documents: Documents = {
"\n query allEventSlugs {\n pages(contentType: \"events.EventPage\") {\n id\n slug\n }\n }\n ": types.AllEventSlugsDocument,
"\n query allAssociationSlugs {\n pages(contentType: \"associations.AssociationPage\") {\n id\n slug\n }\n }\n ": types.AllAssociationSlugsDocument,
"\n query allVenueSlugs {\n pages(contentType: \"venues.VenuePage\", limit: 100) {\n id\n slug\n }\n }\n ": types.AllVenueSlugsDocument,
"\n query previewPage($token: String!) {\n page: page(token: $token) {\n __typename\n ... on GenericPage { ...Generic }\n ... on StudioPage { ...Studio }\n ... on SponsorsPage { ...SponsorsPage }\n ... on HomePage { ...Home }\n ... on EventPage { ...Event }\n ... on NewsPage { ...News }\n ... on AssociationPage { ...Association }\n ... on VenuePage { ...Venue }\n ... on NewsIndex { ...NewsIndex }\n ... on AssociationIndex { ...AssociationIndex }\n ... on VenueIndex { ...VenueIndex }\n ... on VenueRentalIndex { ...VenueRentalIndex }\n ... on ContactIndex { ...ContactIndex }\n }\n }\n": types.PreviewPageDocument,
"\n query search($query: String) {\n results: search(query: $query) {\n __typename\n ... on PageInterface {\n slug\n }\n ... on NewsPage {\n id\n title\n }\n ... on EventPage {\n id\n title\n }\n ... on GenericPage {\n id\n title\n }\n ... on VenuePage {\n id\n title\n }\n ... on AssociationPage {\n id\n title\n associationType\n }\n }\n }\n ": types.SearchDocument,
"\n fragment AssociationIndex on AssociationIndex {\n ... on AssociationIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": types.AssociationIndexFragmentDoc,
"\n fragment AssociationIndex on AssociationIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n": types.AssociationIndexFragmentDoc,
"\n fragment Association on AssociationPage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n excerpt\n lead\n body {\n ...Blocks\n }\n logo {\n url\n width\n height\n }\n associationType\n websiteUrl\n }\n": types.AssociationFragmentDoc,
"\n query allAssociations {\n index: associationIndex {\n ... on AssociationIndex {\n ...AssociationIndex\n }\n }\n associations: pages(\n contentType: \"associations.AssociationPage\"\n limit: 1000\n ) {\n ... on AssociationPage {\n ...Association\n }\n }\n }\n": types.AllAssociationsDocument,
"\n query associationBySlug($slug: String!) {\n association: page(\n contentType: \"associations.AssociationPage\"\n slug: $slug\n ) {\n ... on AssociationPage {\n ...Association\n }\n }\n }\n": types.AssociationBySlugDocument,
@@ -101,24 +103,24 @@ const documents: Documents = {
"\n fragment ImageWithTextBlock on ImageWithTextBlock {\n image {\n ...Image\n }\n imageFormat\n text\n }\n": types.ImageWithTextBlockFragmentDoc,
"\n fragment PageSectionBlock on PageSectionBlock {\n title\n backgroundColor\n icon\n body {\n id\n blockType\n }\n }\n": types.PageSectionBlockFragmentDoc,
"\n fragment RichTextBlock on RichTextBlock {\n rawValue\n value\n }\n": types.RichTextBlockFragmentDoc,
"\n fragment ContactIndex on ContactIndex {\n ... on ContactIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": types.ContactIndexFragmentDoc,
"\n fragment ContactIndex on ContactIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n": types.ContactIndexFragmentDoc,
"\n query contacts {\n index: contactIndex {\n ... on ContactIndex {\n ...ContactIndex\n }\n }\n }\n": types.ContactsDocument,
"\n query eventBySlug($slug: String!) {\n event: page(contentType: \"events.EventPage\", slug: $slug) {\n ... on EventPage {\n ...Event\n }\n }\n }\n": types.EventBySlugDocument,
"\n fragment Generic on GenericPage {\n __typename\n id\n urlPath\n seoTitle\n searchDescription\n title\n lead\n pig\n body {\n ...Blocks\n }\n }\n": types.GenericFragmentDoc,
"\n query genericPageByUrl($urlPath: String!) {\n page: page(contentType: \"generic.GenericPage\", urlPath: $urlPath) {\n ... on GenericPage {\n ...Generic\n }\n }\n }\n": types.GenericPageByUrlDocument,
"\n fragment Home on HomePage {\n ... on HomePage {\n featuredEvents {\n id\n }\n }\n }\n": types.HomeFragmentDoc,
"\n fragment Home on HomePage {\n __typename\n featuredEvents {\n id\n }\n }\n": types.HomeFragmentDoc,
"\n query home {\n events: eventIndex {\n ... on EventIndex {\n futureEvents {\n ... on EventPage {\n ...Event\n }\n }\n }\n }\n home: page(contentType: \"home.HomePage\", urlPath: \"/home/\") {\n ... on HomePage {\n ...Home\n }\n }\n news: pages(contentType: \"news.newsPage\", order: \"-first_published_at\", limit: 4) {\n ... on NewsPage {\n ...News\n }\n }\n }\n": types.HomeDocument,
"\n query newsBySlug($slug: String!) {\n news: page(contentType: \"news.NewsPage\", slug: $slug) {\n ... on NewsPage {\n ...News\n }\n }\n }\n": types.NewsBySlugDocument,
"\n fragment Sponsor on SponsorBlock {\n id\n name\n logo {\n ...Image\n }\n text\n website\n }\n": types.SponsorFragmentDoc,
"\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n }\n": types.SponsorsPageFragmentDoc,
"\n fragment SponsorsPage on SponsorsPage {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n": types.SponsorsPageFragmentDoc,
"\n query sponsors {\n page: sponsorsPage {\n ... on SponsorsPage {\n ...SponsorsPage\n }\n }\n }\n": types.SponsorsDocument,
"\n fragment Studio on StudioPage {\n __typename\n id\n title\n seoTitle\n searchDescription\n lead\n pig\n logo {\n url\n width\n height\n alt\n }\n body {\n ...Blocks\n }\n }\n": types.StudioFragmentDoc,
"\n query studio {\n page: studioPage {\n ... on StudioPage {\n ...Studio\n }\n }\n }\n": types.StudioDocument,
"\n fragment VenueIndex on VenueIndex {\n ... on VenueIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": types.VenueIndexFragmentDoc,
"\n fragment VenueIndex on VenueIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n": types.VenueIndexFragmentDoc,
"\n fragment Venue on VenuePage {\n __typename\n id\n slug\n title\n seoTitle\n searchDescription\n images {\n __typename\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n }\n body {\n ...Blocks\n }\n featuredImage {\n ...Image\n }\n showAsBookable\n showInOverview\n floor\n preposition\n usedFor\n techSpecsUrl\n capabilityAudio\n capabilityAudioVideo\n capabilityBar\n capabilityLighting\n capacityLegal\n capacityStanding\n capacitySitting\n }\n": types.VenueFragmentDoc,
"\n query venueIndex {\n index: venueIndex {\n ... on VenueIndex {\n ...VenueIndex\n }\n }\n venues: pages(contentType: \"venues.VenuePage\", limit: 100) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": types.VenueIndexDocument,
"\n query venueBySlug($slug: String!) {\n venue: page(contentType: \"venues.VenuePage\", slug: $slug) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": types.VenueBySlugDocument,
"\n fragment VenueRentalIndex on VenueRentalIndex {\n ... on VenueRentalIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n": types.VenueRentalIndexFragmentDoc,
"\n fragment VenueRentalIndex on VenueRentalIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n": types.VenueRentalIndexFragmentDoc,
"\n query venueRentalIndex {\n index: venueRentalIndex {\n ... on VenueRentalIndex {\n ...VenueRentalIndex\n }\n }\n venues: pages(contentType: \"venues.VenuePage\", limit: 100) {\n ... on VenuePage {\n ...Venue\n }\n }\n }\n": types.VenueRentalIndexDocument,
"\n fragment LeafBlocks on StreamFieldInterface {\n id\n blockType\n field\n ... on RichTextBlock {\n ...RichTextBlock\n }\n ... on ImageWithTextBlock {\n ...ImageWithTextBlock\n }\n ... on ImageSliderBlock {\n ...ImageSliderBlock\n }\n ... on HorizontalRuleBlock {\n ...HorizontalRuleBlock\n }\n ... on FeaturedBlock {\n ...FeaturedBlock\n }\n ... on ContactListBlock {\n ...ContactListBlock\n }\n ... on EmbedBlock {\n ...EmbedBlock\n }\n ... on FactBoxBlock {\n ...FactBoxBlock\n }\n }\n": types.LeafBlocksFragmentDoc,
"\n fragment OneLevelOfBlocks on StreamFieldInterface {\n ...LeafBlocks\n ... on AccordionBlock {\n ...AccordionBlock\n body {\n ...LeafBlocks\n }\n }\n ... on PageSectionBlock {\n ...PageSectionBlock\n body {\n ...LeafBlocks\n }\n }\n }\n": types.OneLevelOfBlocksFragmentDoc,
@@ -174,6 +176,10 @@ export function graphql(source: "\n query allAssociationSlugs {\n pages(
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query allVenueSlugs {\n pages(contentType: \"venues.VenuePage\", limit: 100) {\n id\n slug\n }\n }\n "): (typeof documents)["\n query allVenueSlugs {\n pages(contentType: \"venues.VenuePage\", limit: 100) {\n id\n slug\n }\n }\n "];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query previewPage($token: String!) {\n page: page(token: $token) {\n __typename\n ... on GenericPage { ...Generic }\n ... on StudioPage { ...Studio }\n ... on SponsorsPage { ...SponsorsPage }\n ... on HomePage { ...Home }\n ... on EventPage { ...Event }\n ... on NewsPage { ...News }\n ... on AssociationPage { ...Association }\n ... on VenuePage { ...Venue }\n ... on NewsIndex { ...NewsIndex }\n ... on AssociationIndex { ...AssociationIndex }\n ... on VenueIndex { ...VenueIndex }\n ... on VenueRentalIndex { ...VenueRentalIndex }\n ... on ContactIndex { ...ContactIndex }\n }\n }\n"): (typeof documents)["\n query previewPage($token: String!) {\n page: page(token: $token) {\n __typename\n ... on GenericPage { ...Generic }\n ... on StudioPage { ...Studio }\n ... on SponsorsPage { ...SponsorsPage }\n ... on HomePage { ...Home }\n ... on EventPage { ...Event }\n ... on NewsPage { ...News }\n ... on AssociationPage { ...Association }\n ... on VenuePage { ...Venue }\n ... on NewsIndex { ...NewsIndex }\n ... on AssociationIndex { ...AssociationIndex }\n ... on VenueIndex { ...VenueIndex }\n ... on VenueRentalIndex { ...VenueRentalIndex }\n ... on ContactIndex { ...ContactIndex }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -181,7 +187,7 @@ export function graphql(source: "\n query search($query: String) {\n
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n fragment AssociationIndex on AssociationIndex {\n ... on AssociationIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n"): (typeof documents)["\n fragment AssociationIndex on AssociationIndex {\n ... on AssociationIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n"];
export function graphql(source: "\n fragment AssociationIndex on AssociationIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n"): (typeof documents)["\n fragment AssociationIndex on AssociationIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -253,7 +259,7 @@ export function graphql(source: "\n fragment RichTextBlock on RichTextBlock {\n
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n fragment ContactIndex on ContactIndex {\n ... on ContactIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n"): (typeof documents)["\n fragment ContactIndex on ContactIndex {\n ... on ContactIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n"];
export function graphql(source: "\n fragment ContactIndex on ContactIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n"): (typeof documents)["\n fragment ContactIndex on ContactIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -273,7 +279,7 @@ export function graphql(source: "\n query genericPageByUrl($urlPath: String!) {
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n fragment Home on HomePage {\n ... on HomePage {\n featuredEvents {\n id\n }\n }\n }\n"): (typeof documents)["\n fragment Home on HomePage {\n ... on HomePage {\n featuredEvents {\n id\n }\n }\n }\n"];
export function graphql(source: "\n fragment Home on HomePage {\n __typename\n featuredEvents {\n id\n }\n }\n"): (typeof documents)["\n fragment Home on HomePage {\n __typename\n featuredEvents {\n id\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -289,7 +295,7 @@ export function graphql(source: "\n fragment Sponsor on SponsorBlock {\n id\
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n }\n"): (typeof documents)["\n fragment SponsorsPage on SponsorsPage {\n ... on SponsorsPage {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n }\n"];
export function graphql(source: "\n fragment SponsorsPage on SponsorsPage {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n"): (typeof documents)["\n fragment SponsorsPage on SponsorsPage {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n sponsors {\n ... on SponsorBlock {\n ...Sponsor\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -305,7 +311,7 @@ export function graphql(source: "\n query studio {\n page: studioPage {\n
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n fragment VenueIndex on VenueIndex {\n ... on VenueIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n"): (typeof documents)["\n fragment VenueIndex on VenueIndex {\n ... on VenueIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n"];
export function graphql(source: "\n fragment VenueIndex on VenueIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n"): (typeof documents)["\n fragment VenueIndex on VenueIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
@@ -321,7 +327,7 @@ export function graphql(source: "\n query venueBySlug($slug: String!) {\n ve
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n fragment VenueRentalIndex on VenueRentalIndex {\n ... on VenueRentalIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n"): (typeof documents)["\n fragment VenueRentalIndex on VenueRentalIndex {\n ... on VenueRentalIndex {\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n }\n"];
export function graphql(source: "\n fragment VenueRentalIndex on VenueRentalIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n"): (typeof documents)["\n fragment VenueRentalIndex on VenueRentalIndex {\n __typename\n title\n seoTitle\n searchDescription\n lead\n body {\n ...Blocks\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
+82 -19
View File
File diff suppressed because one or more lines are too long