add support for generic pages
This commit is contained in:
83
web/src/app/[...url]/page.tsx
Normal file
83
web/src/app/[...url]/page.tsx
Normal file
@ -0,0 +1,83 @@
|
||||
import { graphql } from "@/gql";
|
||||
import { GenericFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { notFound } from 'next/navigation'
|
||||
|
||||
export const dynamicParams = false
|
||||
|
||||
const GenericFragmentDefinition = graphql(`
|
||||
fragment Generic on GenericPage {
|
||||
__typename
|
||||
id
|
||||
title
|
||||
body {
|
||||
id
|
||||
blockType
|
||||
field
|
||||
... on RichTextBlock {
|
||||
rawValue
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const allGenericSlugsQuery = graphql(`
|
||||
query allGenericSlugs {
|
||||
pages(contentType: "generic.GenericPage") {
|
||||
id
|
||||
urlPath
|
||||
}
|
||||
}
|
||||
`);
|
||||
const { data } = await getClient().query(allGenericSlugsQuery, {});
|
||||
|
||||
return data?.pages.map((page: any) => {
|
||||
// wagtail-grapple prepends the home page slug to the full path on multisite setups
|
||||
// we also strip the trailing slash
|
||||
const urlPath = page.urlPath.replace(/\/home/, "").replace(/\/$/, "");
|
||||
console.log("adding", urlPath);
|
||||
return {
|
||||
url: [urlPath],
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
export default async function Page({ params }: { params: { url: string } }) {
|
||||
const { url } = params;
|
||||
// for the page /foo/bar we need to look for `/home/foo/bar/`
|
||||
const urlPath = `/home/${url}/`;
|
||||
console.log("real urlPath for", url, "is", urlPath);
|
||||
|
||||
const genericPageByUrlPathQuery = graphql(`
|
||||
query genericPageByUrl($urlPath: String!) {
|
||||
page: page(contentType: "generic.GenericPage", urlPath: $urlPath) {
|
||||
... on GenericPage {
|
||||
...Generic
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
const { data, error } = await getClient().query(genericPageByUrlPathQuery, {
|
||||
urlPath: urlPath,
|
||||
});
|
||||
|
||||
|
||||
const page = (data?.page ?? []) as GenericFragment[];
|
||||
|
||||
if (!page) {
|
||||
return notFound()
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<section className="page-header">
|
||||
<h1>{page.title}</h1>
|
||||
</section>
|
||||
<Blocks blocks={page.body} />
|
||||
</main>
|
||||
);
|
||||
}
|
@ -13,6 +13,9 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
|
||||
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
||||
*/
|
||||
const documents = {
|
||||
"\n fragment Generic on GenericPage {\n __typename\n id\n title\n body {\n id\n blockType\n field\n ... on RichTextBlock {\n rawValue\n value\n }\n }\n }\n": types.GenericFragmentDoc,
|
||||
"\n query allGenericSlugs {\n pages(contentType: \"generic.GenericPage\") {\n id\n urlPath\n }\n }\n ": types.AllGenericSlugsDocument,
|
||||
"\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 query allEventSlugs {\n pages(contentType: \"events.EventPage\") {\n id\n slug\n }\n }\n ": types.AllEventSlugsDocument,
|
||||
"\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 Event on EventPage {\n __typename\n id\n slug\n title\n body {\n id\n blockType\n field\n ... on RichTextBlock {\n rawValue\n value\n }\n }\n featuredImage {\n url\n width\n height\n }\n facebookUrl\n ticketUrl\n priceRegular\n priceMember\n priceStudent\n }\n": types.EventFragmentDoc,
|
||||
@ -38,6 +41,18 @@ const documents = {
|
||||
*/
|
||||
export function graphql(source: string): unknown;
|
||||
|
||||
/**
|
||||
* 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 Generic on GenericPage {\n __typename\n id\n title\n body {\n id\n blockType\n field\n ... on RichTextBlock {\n rawValue\n value\n }\n }\n }\n"): (typeof documents)["\n fragment Generic on GenericPage {\n __typename\n id\n title\n body {\n id\n blockType\n field\n ... on RichTextBlock {\n rawValue\n value\n }\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 allGenericSlugs {\n pages(contentType: \"generic.GenericPage\") {\n id\n urlPath\n }\n }\n "): (typeof documents)["\n query allGenericSlugs {\n pages(contentType: \"generic.GenericPage\") {\n id\n urlPath\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 genericPageByUrl($urlPath: String!) {\n page: page(contentType: \"generic.GenericPage\", urlPath: $urlPath) {\n ... on GenericPage {\n ...Generic\n }\n }\n }\n "): (typeof documents)["\n query genericPageByUrl($urlPath: String!) {\n page: page(contentType: \"generic.GenericPage\", urlPath: $urlPath) {\n ... on GenericPage {\n ...Generic\n }\n }\n }\n "];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
|
@ -52,6 +52,7 @@ export type Association = PageInterface & {
|
||||
expireAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
expired: Scalars['Boolean']['output'];
|
||||
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
genericpage?: Maybe<GenericPage>;
|
||||
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
hasUnpublishedChanges: Scalars['Boolean']['output'];
|
||||
homepage?: Maybe<HomePage>;
|
||||
@ -291,6 +292,7 @@ export type EventIndex = PageInterface & {
|
||||
expireAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
expired: Scalars['Boolean']['output'];
|
||||
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
genericpage?: Maybe<GenericPage>;
|
||||
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
hasUnpublishedChanges: Scalars['Boolean']['output'];
|
||||
homepage?: Maybe<HomePage>;
|
||||
@ -399,6 +401,7 @@ export type EventPage = PageInterface & {
|
||||
facebookUrl?: Maybe<Scalars['String']['output']>;
|
||||
featuredImage?: Maybe<ImageObjectType>;
|
||||
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
genericpage?: Maybe<GenericPage>;
|
||||
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
hasUnpublishedChanges: Scalars['Boolean']['output'];
|
||||
homepage?: Maybe<HomePage>;
|
||||
@ -496,6 +499,108 @@ export type FloatBlock = StreamFieldInterface & {
|
||||
value: Scalars['Float']['output'];
|
||||
};
|
||||
|
||||
export type GenericPage = PageInterface & {
|
||||
__typename?: 'GenericPage';
|
||||
aliasOf?: Maybe<Page>;
|
||||
aliases: Array<Page>;
|
||||
ancestors: Array<PageInterface>;
|
||||
association?: Maybe<Association>;
|
||||
body?: Maybe<Array<Maybe<StreamFieldInterface>>>;
|
||||
children: Array<PageInterface>;
|
||||
contentType: Scalars['String']['output'];
|
||||
depth?: Maybe<Scalars['Int']['output']>;
|
||||
descendants: Array<PageInterface>;
|
||||
draftTitle: Scalars['String']['output'];
|
||||
eventindex?: Maybe<EventIndex>;
|
||||
eventpage?: Maybe<EventPage>;
|
||||
expireAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
expired: Scalars['Boolean']['output'];
|
||||
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
genericpage?: Maybe<GenericPage>;
|
||||
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
hasUnpublishedChanges: Scalars['Boolean']['output'];
|
||||
homepage?: Maybe<HomePage>;
|
||||
id?: Maybe<Scalars['ID']['output']>;
|
||||
lastPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
latestRevisionCreatedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
live: Scalars['Boolean']['output'];
|
||||
locked?: Maybe<Scalars['Boolean']['output']>;
|
||||
lockedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
nextSiblings: Array<PageInterface>;
|
||||
numchild: Scalars['Int']['output'];
|
||||
pageType?: Maybe<Scalars['String']['output']>;
|
||||
parent?: Maybe<PageInterface>;
|
||||
path: Scalars['String']['output'];
|
||||
previousSiblings: Array<PageInterface>;
|
||||
searchDescription?: Maybe<Scalars['String']['output']>;
|
||||
searchScore?: Maybe<Scalars['Float']['output']>;
|
||||
seoTitle: Scalars['String']['output'];
|
||||
showInMenus: Scalars['Boolean']['output'];
|
||||
siblings: Array<PageInterface>;
|
||||
sitesRootedHere: Array<SiteObjectType>;
|
||||
slug: Scalars['String']['output'];
|
||||
title: Scalars['String']['output'];
|
||||
translationKey: Scalars['UUID']['output'];
|
||||
url?: Maybe<Scalars['String']['output']>;
|
||||
urlPath: Scalars['String']['output'];
|
||||
venueindex?: Maybe<VenueIndex>;
|
||||
venuepage?: Maybe<VenuePage>;
|
||||
};
|
||||
|
||||
|
||||
export type GenericPageAncestorsArgs = {
|
||||
id?: InputMaybe<Scalars['ID']['input']>;
|
||||
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
order?: InputMaybe<Scalars['String']['input']>;
|
||||
searchQuery?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type GenericPageChildrenArgs = {
|
||||
id?: InputMaybe<Scalars['ID']['input']>;
|
||||
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
order?: InputMaybe<Scalars['String']['input']>;
|
||||
searchQuery?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type GenericPageDescendantsArgs = {
|
||||
id?: InputMaybe<Scalars['ID']['input']>;
|
||||
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
order?: InputMaybe<Scalars['String']['input']>;
|
||||
searchQuery?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type GenericPageNextSiblingsArgs = {
|
||||
id?: InputMaybe<Scalars['ID']['input']>;
|
||||
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
order?: InputMaybe<Scalars['String']['input']>;
|
||||
searchQuery?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type GenericPagePreviousSiblingsArgs = {
|
||||
id?: InputMaybe<Scalars['ID']['input']>;
|
||||
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
order?: InputMaybe<Scalars['String']['input']>;
|
||||
searchQuery?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type GenericPageSiblingsArgs = {
|
||||
id?: InputMaybe<Scalars['ID']['input']>;
|
||||
limit?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
offset?: InputMaybe<Scalars['PositiveInt']['input']>;
|
||||
order?: InputMaybe<Scalars['String']['input']>;
|
||||
searchQuery?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
export type HomePage = PageInterface & {
|
||||
__typename?: 'HomePage';
|
||||
aliasOf?: Maybe<Page>;
|
||||
@ -512,6 +617,7 @@ export type HomePage = PageInterface & {
|
||||
expireAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
expired: Scalars['Boolean']['output'];
|
||||
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
genericpage?: Maybe<GenericPage>;
|
||||
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
hasUnpublishedChanges: Scalars['Boolean']['output'];
|
||||
homepage?: Maybe<HomePage>;
|
||||
@ -706,6 +812,7 @@ export type Page = PageInterface & {
|
||||
expireAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
expired: Scalars['Boolean']['output'];
|
||||
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
genericpage?: Maybe<GenericPage>;
|
||||
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
hasUnpublishedChanges: Scalars['Boolean']['output'];
|
||||
homepage?: Maybe<HomePage>;
|
||||
@ -1055,7 +1162,7 @@ export type RichTextBlock = StreamFieldInterface & {
|
||||
value: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export type Search = Association | EventIndex | EventOccurrence | EventPage | HomePage | Page | VenueIndex | VenuePage;
|
||||
export type Search = Association | EventIndex | EventOccurrence | EventPage | GenericPage | HomePage | Page | VenueIndex | VenuePage;
|
||||
|
||||
export type SiteObjectType = {
|
||||
__typename?: 'SiteObjectType';
|
||||
@ -1188,6 +1295,7 @@ export type VenueIndex = PageInterface & {
|
||||
expireAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
expired: Scalars['Boolean']['output'];
|
||||
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
genericpage?: Maybe<GenericPage>;
|
||||
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
hasUnpublishedChanges: Scalars['Boolean']['output'];
|
||||
homepage?: Maybe<HomePage>;
|
||||
@ -1298,6 +1406,7 @@ export type VenuePage = PageInterface & {
|
||||
featuredImage?: Maybe<ImageObjectType>;
|
||||
firstPublishedAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
floor?: Maybe<Scalars['String']['output']>;
|
||||
genericpage?: Maybe<GenericPage>;
|
||||
goLiveAt?: Maybe<Scalars['DateTime']['output']>;
|
||||
hasUnpublishedChanges: Scalars['Boolean']['output'];
|
||||
homepage?: Maybe<HomePage>;
|
||||
@ -1384,10 +1493,27 @@ export type VenuePageSiblingsArgs = {
|
||||
searchQuery?: InputMaybe<Scalars['String']['input']>;
|
||||
};
|
||||
|
||||
export type GenericFragment = { __typename: 'GenericPage', id?: string | null, title: string, body?: Array<{ __typename?: 'BlockQuoteBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'BooleanBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'CharBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'ChoiceBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'DateBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'DateTimeBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'DecimalBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'DocumentChooserBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'EmailBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'EmbedBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'FloatBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'ImageChooserBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'IntegerBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'ListBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'PageChooserBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'RawHTMLBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'RegexBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'RichTextBlock', rawValue: string, value: string, id?: string | null, blockType: string, field: string } | { __typename?: 'StaticBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'StreamBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'StreamFieldBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'StructBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'TextBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'TimeBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'URLBlock', id?: string | null, blockType: string, field: string } | null> | null } & { ' $fragmentName'?: 'GenericFragment' };
|
||||
|
||||
export type AllGenericSlugsQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type AllGenericSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'Association', id?: string | null, urlPath: string } | { __typename?: 'EventIndex', id?: string | null, urlPath: string } | { __typename?: 'EventPage', id?: string | null, urlPath: string } | { __typename?: 'GenericPage', id?: string | null, urlPath: string } | { __typename?: 'HomePage', id?: string | null, urlPath: string } | { __typename?: 'Page', id?: string | null, urlPath: string } | { __typename?: 'VenueIndex', id?: string | null, urlPath: string } | { __typename?: 'VenuePage', id?: string | null, urlPath: string }> };
|
||||
|
||||
export type GenericPageByUrlQueryVariables = Exact<{
|
||||
urlPath: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GenericPageByUrlQuery = { __typename?: 'Query', page?: { __typename?: 'Association' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | (
|
||||
{ __typename?: 'GenericPage' }
|
||||
& { ' $fragmentRefs'?: { 'GenericFragment': GenericFragment } }
|
||||
) | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' } | null };
|
||||
|
||||
export type AllEventSlugsQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type AllEventSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'Association', id?: string | null, slug: string } | { __typename?: 'EventIndex', id?: string | null, slug: string } | { __typename?: 'EventPage', id?: string | null, slug: string } | { __typename?: 'HomePage', id?: string | null, slug: string } | { __typename?: 'Page', id?: string | null, slug: string } | { __typename?: 'VenueIndex', id?: string | null, slug: string } | { __typename?: 'VenuePage', id?: string | null, slug: string }> };
|
||||
export type AllEventSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'Association', id?: string | null, slug: string } | { __typename?: 'EventIndex', id?: string | null, slug: string } | { __typename?: 'EventPage', id?: string | null, slug: string } | { __typename?: 'GenericPage', id?: string | null, slug: string } | { __typename?: 'HomePage', id?: string | null, slug: string } | { __typename?: 'Page', id?: string | null, slug: string } | { __typename?: 'VenueIndex', id?: string | null, slug: string } | { __typename?: 'VenuePage', id?: string | null, slug: string }> };
|
||||
|
||||
export type EventBySlugQueryVariables = Exact<{
|
||||
slug: Scalars['String']['input'];
|
||||
@ -1397,7 +1523,7 @@ export type EventBySlugQueryVariables = Exact<{
|
||||
export type EventBySlugQuery = { __typename?: 'Query', event?: { __typename?: 'Association' } | { __typename?: 'EventIndex' } | (
|
||||
{ __typename?: 'EventPage' }
|
||||
& { ' $fragmentRefs'?: { 'EventFragment': EventFragment } }
|
||||
) | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' } | null };
|
||||
) | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' } | null };
|
||||
|
||||
export type EventFragment = { __typename: 'EventPage', id?: string | null, slug: string, title: string, facebookUrl?: string | null, ticketUrl?: string | null, priceRegular?: number | null, priceMember?: number | null, priceStudent?: number | null, body?: Array<{ __typename?: 'BlockQuoteBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'BooleanBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'CharBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'ChoiceBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'DateBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'DateTimeBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'DecimalBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'DocumentChooserBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'EmailBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'EmbedBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'FloatBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'ImageChooserBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'IntegerBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'ListBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'PageChooserBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'RawHTMLBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'RegexBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'RichTextBlock', rawValue: string, value: string, id?: string | null, blockType: string, field: string } | { __typename?: 'StaticBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'StreamBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'StreamFieldBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'StructBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'TextBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'TimeBlock', id?: string | null, blockType: string, field: string } | { __typename?: 'URLBlock', id?: string | null, blockType: string, field: string } | null> | null, featuredImage?: { __typename?: 'ImageObjectType', url: string, width: number, height: number } | null } & { ' $fragmentName'?: 'EventFragment' };
|
||||
|
||||
@ -1407,19 +1533,19 @@ export type AllEventsQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
export type AllEventsQuery = { __typename?: 'Query', events: Array<{ __typename?: 'Association' } | { __typename?: 'EventIndex' } | (
|
||||
{ __typename?: 'EventPage' }
|
||||
& { ' $fragmentRefs'?: { 'EventFragment': EventFragment } }
|
||||
) | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' }> };
|
||||
) | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' }> };
|
||||
|
||||
export type AllVenueSlugsQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type AllVenueSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'Association', id?: string | null, slug: string } | { __typename?: 'EventIndex', id?: string | null, slug: string } | { __typename?: 'EventPage', id?: string | null, slug: string } | { __typename?: 'HomePage', id?: string | null, slug: string } | { __typename?: 'Page', id?: string | null, slug: string } | { __typename?: 'VenueIndex', id?: string | null, slug: string } | { __typename?: 'VenuePage', id?: string | null, slug: string }> };
|
||||
export type AllVenueSlugsQuery = { __typename?: 'Query', pages: Array<{ __typename?: 'Association', id?: string | null, slug: string } | { __typename?: 'EventIndex', id?: string | null, slug: string } | { __typename?: 'EventPage', id?: string | null, slug: string } | { __typename?: 'GenericPage', id?: string | null, slug: string } | { __typename?: 'HomePage', id?: string | null, slug: string } | { __typename?: 'Page', id?: string | null, slug: string } | { __typename?: 'VenueIndex', id?: string | null, slug: string } | { __typename?: 'VenuePage', id?: string | null, slug: string }> };
|
||||
|
||||
export type VenueBySlugQueryVariables = Exact<{
|
||||
slug: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
|
||||
export type VenueBySlugQuery = { __typename?: 'Query', venue?: { __typename?: 'Association' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | (
|
||||
export type VenueBySlugQuery = { __typename?: 'Query', venue?: { __typename?: 'Association' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | (
|
||||
{ __typename?: 'VenuePage' }
|
||||
& { ' $fragmentRefs'?: { 'VenueFragment': VenueFragment } }
|
||||
) | null };
|
||||
@ -1429,7 +1555,7 @@ export type VenueFragment = { __typename: 'VenuePage', id?: string | null, slug:
|
||||
export type AllVenuesQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type AllVenuesQuery = { __typename?: 'Query', venues: Array<{ __typename?: 'Association' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | (
|
||||
export type AllVenuesQuery = { __typename?: 'Query', venues: Array<{ __typename?: 'Association' } | { __typename?: 'EventIndex' } | { __typename?: 'EventPage' } | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | (
|
||||
{ __typename?: 'VenuePage' }
|
||||
& { ' $fragmentRefs'?: { 'VenueFragment': VenueFragment } }
|
||||
)> };
|
||||
@ -1440,10 +1566,13 @@ export type HomeQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
export type HomeQuery = { __typename?: 'Query', events: Array<{ __typename?: 'Association' } | { __typename?: 'EventIndex' } | (
|
||||
{ __typename?: 'EventPage' }
|
||||
& { ' $fragmentRefs'?: { 'EventFragment': EventFragment } }
|
||||
) | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' }> };
|
||||
) | { __typename?: 'GenericPage' } | { __typename?: 'HomePage' } | { __typename?: 'Page' } | { __typename?: 'VenueIndex' } | { __typename?: 'VenuePage' }> };
|
||||
|
||||
export const GenericFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Generic"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GenericPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"blockType"}},{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RichTextBlock"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rawValue"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]} as unknown as DocumentNode<GenericFragment, unknown>;
|
||||
export const EventFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Event"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EventPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"blockType"}},{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RichTextBlock"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rawValue"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"featuredImage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"width"}},{"kind":"Field","name":{"kind":"Name","value":"height"}}]}},{"kind":"Field","name":{"kind":"Name","value":"facebookUrl"}},{"kind":"Field","name":{"kind":"Name","value":"ticketUrl"}},{"kind":"Field","name":{"kind":"Name","value":"priceRegular"}},{"kind":"Field","name":{"kind":"Name","value":"priceMember"}},{"kind":"Field","name":{"kind":"Name","value":"priceStudent"}}]}}]} as unknown as DocumentNode<EventFragment, unknown>;
|
||||
export const VenueFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Venue"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"VenuePage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"blockType"}},{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RichTextBlock"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rawValue"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"featuredImage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"width"}},{"kind":"Field","name":{"kind":"Name","value":"height"}}]}},{"kind":"Field","name":{"kind":"Name","value":"showAsBookable"}},{"kind":"Field","name":{"kind":"Name","value":"floor"}},{"kind":"Field","name":{"kind":"Name","value":"preposition"}},{"kind":"Field","name":{"kind":"Name","value":"capabilityAudio"}},{"kind":"Field","name":{"kind":"Name","value":"capabilityAudioVideo"}},{"kind":"Field","name":{"kind":"Name","value":"capabilityBar"}},{"kind":"Field","name":{"kind":"Name","value":"capabilityLighting"}},{"kind":"Field","name":{"kind":"Name","value":"capacityLegal"}},{"kind":"Field","name":{"kind":"Name","value":"capacityStanding"}},{"kind":"Field","name":{"kind":"Name","value":"capacitySitting"}}]}}]} as unknown as DocumentNode<VenueFragment, unknown>;
|
||||
export const AllGenericSlugsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"allGenericSlugs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pages"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"contentType"},"value":{"kind":"StringValue","value":"generic.GenericPage","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"urlPath"}}]}}]}}]} as unknown as DocumentNode<AllGenericSlugsQuery, AllGenericSlugsQueryVariables>;
|
||||
export const GenericPageByUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"genericPageByUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"urlPath"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"page"},"name":{"kind":"Name","value":"page"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"contentType"},"value":{"kind":"StringValue","value":"generic.GenericPage","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"urlPath"},"value":{"kind":"Variable","name":{"kind":"Name","value":"urlPath"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GenericPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Generic"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Generic"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GenericPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"blockType"}},{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RichTextBlock"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rawValue"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}}]}}]} as unknown as DocumentNode<GenericPageByUrlQuery, GenericPageByUrlQueryVariables>;
|
||||
export const AllEventSlugsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"allEventSlugs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pages"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"contentType"},"value":{"kind":"StringValue","value":"events.EventPage","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]} as unknown as DocumentNode<AllEventSlugsQuery, AllEventSlugsQueryVariables>;
|
||||
export const EventBySlugDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"eventBySlug"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"event"},"name":{"kind":"Name","value":"page"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"contentType"},"value":{"kind":"StringValue","value":"events.EventPage","block":false}},{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EventPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Event"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Event"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EventPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"blockType"}},{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RichTextBlock"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rawValue"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"featuredImage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"width"}},{"kind":"Field","name":{"kind":"Name","value":"height"}}]}},{"kind":"Field","name":{"kind":"Name","value":"facebookUrl"}},{"kind":"Field","name":{"kind":"Name","value":"ticketUrl"}},{"kind":"Field","name":{"kind":"Name","value":"priceRegular"}},{"kind":"Field","name":{"kind":"Name","value":"priceMember"}},{"kind":"Field","name":{"kind":"Name","value":"priceStudent"}}]}}]} as unknown as DocumentNode<EventBySlugQuery, EventBySlugQueryVariables>;
|
||||
export const AllEventsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"allEvents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"events"},"name":{"kind":"Name","value":"pages"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"contentType"},"value":{"kind":"StringValue","value":"events.EventPage","block":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EventPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Event"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Event"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EventPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"blockType"}},{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RichTextBlock"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"rawValue"}},{"kind":"Field","name":{"kind":"Name","value":"value"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"featuredImage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"width"}},{"kind":"Field","name":{"kind":"Name","value":"height"}}]}},{"kind":"Field","name":{"kind":"Name","value":"facebookUrl"}},{"kind":"Field","name":{"kind":"Name","value":"ticketUrl"}},{"kind":"Field","name":{"kind":"Name","value":"priceRegular"}},{"kind":"Field","name":{"kind":"Name","value":"priceMember"}},{"kind":"Field","name":{"kind":"Name","value":"priceStudent"}}]}}]} as unknown as DocumentNode<AllEventsQuery, AllEventsQueryVariables>;
|
||||
|
Reference in New Issue
Block a user