diff --git a/app/search/fetchSearchResult.server.ts b/app/search/fetchSearchResult.server.ts index bd71e9f2..b351f9d8 100644 --- a/app/search/fetchSearchResult.server.ts +++ b/app/search/fetchSearchResult.server.ts @@ -1,9 +1,12 @@ -import { useSearchWithPaginationQuery } from '@/lib/graphql/generated/fbi/graphql' +import { + FacetField, + useSearchFacetsQuery, + useSearchWithPaginationQuery +} from '@/lib/graphql/generated/fbi/graphql' import getQueryClient from '@/lib/getQueryClient' +import { QueryClient } from '@tanstack/react-query' -const prefetchSearchResult = async (q: string) => { - const queryClient = getQueryClient() - +const prefetchSearchResult = async (q: string, queryClient: QueryClient) => { await queryClient.prefetchQuery({ queryKey: useSearchWithPaginationQuery.getKey({ q: { all: q }, @@ -20,4 +23,35 @@ const prefetchSearchResult = async (q: string) => { return queryClient } -export default prefetchSearchResult +const prefetchSearchFacets = async (q: string, queryClient: QueryClient) => { + await queryClient.prefetchQuery({ + queryKey: useSearchFacetsQuery.getKey({ + q: { all: q }, + facetLimit: 100, + facets: [ + 'materialTypesGeneral', + 'mainLanguages', + 'age', + 'lix', + 'subjects', + 'let' + ] as FacetField[] + }), + queryFn: useSearchFacetsQuery.fetcher({ + q: { all: q }, + facetLimit: 100, + facets: [ + 'materialTypesGeneral', + 'mainLanguages', + 'age', + 'lix', + 'subjects', + 'let' + ] as FacetField[] + }) + }) + + return queryClient +} + +export { prefetchSearchFacets, prefetchSearchResult } diff --git a/app/search/page.tsx b/app/search/page.tsx index 6a255588..05556bd4 100644 --- a/app/search/page.tsx +++ b/app/search/page.tsx @@ -2,15 +2,21 @@ import { dehydrate, HydrationBoundary } from '@tanstack/react-query' import SearchPageLayout from '@/components/pages/searchPageLayout/SearchPageLayout' -import prefetchSearchResult from './fetchSearchResult.server' +import { + prefetchSearchFacets, + prefetchSearchResult +} from './fetchSearchResult.server' import { Suspense } from 'react' +import getQueryClient from '@/lib/getQueryClient' const Page = async ({ searchParams: { q } }: { searchParams: { q: string } }) => { - const queryClient = await prefetchSearchResult(q) + const queryClient = getQueryClient() + await prefetchSearchResult(q, queryClient) + await prefetchSearchFacets(q, queryClient) return ( diff --git a/codegen.ts b/codegen.ts index 34176610..7b0ceeff 100644 --- a/codegen.ts +++ b/codegen.ts @@ -3,40 +3,40 @@ import type { CodegenConfig } from '@graphql-codegen/cli' const config: CodegenConfig = { overwrite: true, generates: { - // 'lib/graphql/generated/dpl-cms/graphql.tsx': { - // documents: '**/*.dpl-cms.graphql', - // // TODO: Make this configurable - // schema: 'http://dapple-cms.docker/graphql', - // plugins: [ - // 'typescript', - // 'typescript-operations', - // 'typescript-react-query' - // ], - // config: { - // defaultScalarType: 'unknown', - // reactQueryVersion: 5, - // exposeFetcher: true, - // exposeQueryKeys: true, - // addSuspenseQuery: true, - // fetcher: { - // // TODO: Make this configurable - // endpoint: 'http://dapple-cms.docker/graphql', - // fetchParams: JSON.stringify({ - // headers: { - // 'Content-Type': 'application/json' - // } - // }) - // } - // }, - // hooks: { - // afterOneFileWrite: ['yarn eslint --fix'] - // } - // }, - // 'lib/graphql/generated/dpl-cms/graphql.schema.json': { - // // TODO: Make this configurable - // schema: 'http://dapple-cms.docker/graphql', - // plugins: ['introspection'] - // }, + 'lib/graphql/generated/dpl-cms/graphql.tsx': { + documents: '**/*.dpl-cms.graphql', + // TODO: Make this configurable + schema: 'http://dapple-cms.docker/graphql', + plugins: [ + 'typescript', + 'typescript-operations', + 'typescript-react-query' + ], + config: { + defaultScalarType: 'unknown', + reactQueryVersion: 5, + exposeFetcher: true, + exposeQueryKeys: true, + addSuspenseQuery: true, + fetcher: { + // TODO: Make this configurable + endpoint: 'http://dapple-cms.docker/graphql', + fetchParams: JSON.stringify({ + headers: { + 'Content-Type': 'application/json' + } + }) + } + }, + hooks: { + afterOneFileWrite: ['yarn eslint --fix'] + } + }, + 'lib/graphql/generated/dpl-cms/graphql.schema.json': { + // TODO: Make this configurable + schema: 'http://dapple-cms.docker/graphql', + plugins: ['introspection'] + }, 'lib/graphql/generated/fbi/graphql.tsx': { documents: '**/*.fbi.graphql', schema: [ @@ -66,7 +66,7 @@ const config: CodegenConfig = { typeNames: 'change-case-all#pascalCase', transformUnderscore: true }, - fetcher: '@/lib/fetchers/fbi.fetcher#fetchData' + fetcher: '@/lib/graphql/fetchers/fbi.fetcher#fetchData' }, hooks: { afterOneFileWrite: ['yarn eslint --fix'] diff --git a/components/pages/searchPageLayout/SearchFilterBar.tsx b/components/pages/searchPageLayout/SearchFilterBar.tsx new file mode 100644 index 00000000..37b5e366 --- /dev/null +++ b/components/pages/searchPageLayout/SearchFilterBar.tsx @@ -0,0 +1,63 @@ +'use client' + +import { Badge } from '@/components/ui/badge' +import { SearchFacetsQuery } from '@/lib/graphql/generated/fbi/graphql' +import { cn } from '@/lib/utils' +import { usePathname, useRouter, useSearchParams } from 'next/navigation' +import React, { useEffect } from 'react' + +type facets = SearchFacetsQuery['search']['facets'] + +const SearchFilterBar = ({ facets }: { facets: facets }) => { + const router = useRouter() + const searchParams = useSearchParams() + + const toggleFilter = (filterName: string, value: string) => { + const searchParams = new URLSearchParams(window.location.search) + + if (searchParams.has(filterName)) { + if (searchParams.get(filterName) === value) { + searchParams.delete(filterName) + } else { + searchParams.delete(filterName) + searchParams.append(filterName, value) + } + } else { + searchParams.append(filterName, value) + } + + const searchParamsString = searchParams.toString() + + router.push( + '/search' + searchParamsString ? `?${searchParamsString}` : '', + { scroll: false } + ) + } + + return ( +
+ {facets.length > 0 && + facets.map((facet) => ( +
+

{facet.name}

+
+ {facet.values.map((value, index) => ( + + ))} +
+
+ ))} +
+ ) +} + +export default SearchFilterBar diff --git a/components/pages/searchPageLayout/SearchPageLayout.tsx b/components/pages/searchPageLayout/SearchPageLayout.tsx index 488ac5c1..93ba5a7b 100644 --- a/components/pages/searchPageLayout/SearchPageLayout.tsx +++ b/components/pages/searchPageLayout/SearchPageLayout.tsx @@ -2,39 +2,138 @@ import { useSearchParams } from 'next/navigation' -import { useSearchWithPaginationQuery } from '@/lib/graphql/generated/fbi/graphql' +import { + FacetField, + FacetValue, + useSearchFacetsQuery, + useSearchWithPaginationQuery +} from '@/lib/graphql/generated/fbi/graphql' +import SearchFilterBar from './SearchFilterBar' +import { useEffect } from 'react' + +const facetDefinitions = [ + 'materialTypesGeneral', + 'mainLanguages', + 'age', + 'lix', + 'subjects', + 'let' +] as FacetField[] + +const branchIds = [ + '775120', + '775122', + '775144', + '775167', + '775146', + '775168', + '751010', + '775147', + '751032', + '751031', + '775126', + '751030', + '775149', + '775127', + '775160', + '775162', + '775140', + '751009', + '751029', + '751027', + '751026', + '751025', + '775133', + '751024', + '775100', + '775170', + '775150', + '775130' +] as string[] + +export type FilterItemTerm = Omit + +export const formatFacetTerms = (filters: { + [key: string]: { [key: string]: FilterItemTerm } +}) => { + return Object.keys(filters).reduce( + (acc, key) => ({ + ...acc, + [key]: Object.keys(filters[key]) + }), + {} + ) +} const SearchPageLayout = ({ searchQuery }: { searchQuery?: string }) => { const searchParams = useSearchParams() const q = searchQuery || searchParams.get('q') || '' + const facetsForSearchRequest = facetDefinitions.reduce( + (acc, facetDefinition) => { + const value = searchParams.get(facetDefinition) + if (value) { + return { + ...acc, + [facetDefinition]: [value] + } + } + + return acc + }, + {} as { [key: string]: string[] } + ) + + console.log('facetsForSearchRequest', facetsForSearchRequest) + const { data, error, isLoading, isPending, isFetching } = useSearchWithPaginationQuery({ q: { all: q }, offset: 0, limit: 10, - filters: {} + filters: { + // TODO: Add filters though endpoint + branchId: branchIds, + ...facetsForSearchRequest + } }) + const { + data: facetData, + error: facetError, + isLoading: facetIsLoading, + isPending: facetIsPending, + isFetching: facetIsFetching + } = useSearchFacetsQuery({ + q: { all: q }, + facetLimit: 100, + facets: facetDefinitions, + filters: { + branchId: branchIds, + ...facetsForSearchRequest + } + }) + + useEffect(() => { + // const queryParams = new URLSearchParams(window.location.search); + }, [searchParams]) + if (error) { return
Error: {
{JSON.stringify(error, null, 2)}
}
} - if (!data) return null - const { - search: { hitcount, works } - } = data - return ( -
-

{`Viser resultater for "${q}" (${hitcount})`}

+
+ +

{`Viser resultater for "${q}" ${data?.search.hitcount ? '(' + data?.search.hitcount + ')' : ''}`}

{isFetching &&

isFetching...

} {isLoading &&

isLoading...

} {isPending &&

isPending...

} - {hitcount === 0 &&

Ingen resultater

} + {data?.search.hitcount === 0 &&

Ingen resultater

}
- {hitcount > 0 && - works.map((work) => ( + {data?.search?.hitcount && + data?.search?.hitcount > 0 && + data.search.works.map((work) => (

{work.titles.full}

diff --git a/components/shared/button/Button.tsx b/components/shared/button/Button.tsx index 38acff81..b19c307f 100644 --- a/components/shared/button/Button.tsx +++ b/components/shared/button/Button.tsx @@ -1,71 +1,71 @@ -import { Slot } from "@radix-ui/react-slot"; -import { cva, type VariantProps } from "class-variance-authority"; -import * as React from "react"; +import { Slot } from '@radix-ui/react-slot' +import { cva, type VariantProps } from 'class-variance-authority' +import * as React from 'react' -import { cn } from "@/lib/utils"; +import { cn } from '@/lib/utils' const buttonVariants = cva( - "inline-flex border shadow-button border-foreground text-foreground bg-background rounded-full text-foreground items-center justify-center whitespace-nowrap text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:translate-x-[2px] hover:translate-y-[2px] transition hover:shadow-none", + 'inline-flex border shadow-button border-foreground text-foreground bg-background rounded-full text-foreground items-center justify-center whitespace-nowrap text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:translate-x-[2px] hover:translate-y-[2px] transition hover:shadow-none', { variants: { variant: { - default: "", - icon: "" + default: '', + icon: '' }, size: { - default: "h-[40px]", - sm: "h-[32px]", - lg: "h-[48px]" + default: 'h-[40px]', + sm: 'h-[32px]', + lg: 'h-[48px]' } }, compoundVariants: [ { - variant: "default", - size: "default", - class: "px-10" + variant: 'default', + size: 'default', + class: 'px-10' }, { - variant: "default", - size: "sm", - class: "px-8" + variant: 'default', + size: 'sm', + class: 'px-8' }, { - variant: "default", - size: "lg", - class: "px-12" + variant: 'default', + size: 'lg', + class: 'px-12' }, { - variant: "icon", - size: ["default", "sm", "lg"], - class: "h-[40px] w-[40px]" + variant: 'icon', + size: ['default', 'sm', 'lg'], + class: 'h-[40px] w-[40px]' } ], defaultVariants: { - variant: "default", - size: "default" + variant: 'default', + size: 'default' } } -); +) export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean; + asChild?: boolean } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; + const Comp = asChild ? Slot : 'button' return ( - ); + ) } -); +) -Button.displayName = "Button"; +Button.displayName = 'Button' -export { Button, buttonVariants }; +export { Button, buttonVariants } diff --git a/components/shared/icon/Icon.tsx b/components/shared/icon/Icon.tsx index 8d448c1f..4fcc5be4 100644 --- a/components/shared/icon/Icon.tsx +++ b/components/shared/icon/Icon.tsx @@ -1,16 +1,16 @@ type IconProps = { - name: string; - className?: string; -}; + name: string + className?: string +} export default function Icon({ name, className }: IconProps) { try { - if (!name) return null; + if (!name) return null // eslint-disable-next-line @typescript-eslint/no-require-imports - const SVG = require(`@/public/icons/${name}.svg`)?.default; - if (!SVG) return null; - return ; + const SVG = require(`@/public/icons/${name}.svg`)?.default + if (!SVG) return null + return } catch (error) { - console.error(`Icon ${name} not found: ${error}`); + console.error(`Icon ${name} not found: ${error}`) } } diff --git a/components/shared/searchInput/SearchInput.tsx b/components/shared/searchInput/SearchInput.tsx index 666b4685..1a811c9e 100644 --- a/components/shared/searchInput/SearchInput.tsx +++ b/components/shared/searchInput/SearchInput.tsx @@ -36,7 +36,9 @@ const SearchInput = ({ className }: { className?: string }) => { const navigateToSearch = () => { if (!inputRef.current) return const inputValue = inputRef.current.value - router.push(inputValue ? `/search?q=${inputValue}` : '/search') + router.push(inputValue ? `/search?q=${inputValue}` : '/search', { + scroll: false + }) } return ( @@ -44,7 +46,7 @@ const SearchInput = ({ className }: { className?: string }) => { , + VariantProps {} + +function Badge({ className, variant, ...props }: BadgeProps) { + return ( +
+ ) +} + +export { Badge, badgeVariants } diff --git a/lib/graphql/fetchers/fbi.fetcher.ts b/lib/graphql/fetchers/fbi.fetcher.ts index feb721fe..c4f6975e 100644 --- a/lib/graphql/fetchers/fbi.fetcher.ts +++ b/lib/graphql/fetchers/fbi.fetcher.ts @@ -1,15 +1,15 @@ export const fetchData = ( query: string, variables?: TVariables, - options?: RequestInit["headers"] + options?: RequestInit['headers'] ): (() => Promise) => { return async () => { const res = await fetch( `${process.env.NEXT_PUBLIC_GRAPHQL_SCHEMA_ENDPOINT_FBI}`, { - method: "POST", + method: 'POST', headers: { - "Content-Type": "application/json", + 'Content-Type': 'application/json', Authorization: `Bearer ${process.env.NEXT_PUBLIC_LIBRARY_TOKEN}`, ...options }, @@ -18,15 +18,15 @@ export const fetchData = ( variables }) } - ); + ) - const json = await res.json(); + const json = await res.json() if (json.errors) { - const { message } = json.errors[0] || {}; - throw new Error(message || "Error…"); + const { message } = json.errors[0] || {} + throw new Error(message || 'Error…') } - return json.data; - }; -}; + return json.data + } +} diff --git a/lib/graphql/generated/fbi/graphql.tsx b/lib/graphql/generated/fbi/graphql.tsx index c9bd5905..cf457a12 100644 --- a/lib/graphql/generated/fbi/graphql.tsx +++ b/lib/graphql/generated/fbi/graphql.tsx @@ -1,54 +1,31 @@ -import { - useQuery, - UseQueryOptions, - useSuspenseQuery, - UseSuspenseQueryOptions -} from '@tanstack/react-query' - -import { fetchData } from '@/lib/graphql/fetchers/fbi.fetcher' -export type Maybe = T | null -export type InputMaybe = Maybe -export type Exact = { - [K in keyof T]: T[K] -} -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe -} -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe -} -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T -> = { [_ in K]?: never } -export type Incremental = - | T - | { - [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never - } +import { useQuery, UseQueryOptions, useSuspenseQuery, UseSuspenseQueryOptions } from '@tanstack/react-query'; + +import { fetchData } from '@/lib/graphql/fetchers/fbi.fetcher'; +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string } - String: { input: string; output: string } - Boolean: { input: boolean; output: boolean } - Int: { input: number; output: number } - Float: { input: number; output: number } - DateTime: { input: unknown; output: unknown } - PaginationLimit: { input: unknown; output: unknown } -} + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + DateTime: { input: unknown; output: unknown; } + PaginationLimit: { input: unknown; output: unknown; } +}; -export type Access = - | AccessUrl - | DigitalArticleService - | Ereol - | InfomediaService - | InterLibraryLoan +export type Access = AccessUrl | DigitalArticleService | Ereol | InfomediaService | InterLibraryLoan; export type AccessType = { - __typename?: 'AccessType' - code: AccessTypeCode - display: Scalars['String']['output'] -} + __typename?: 'AccessType'; + code: AccessTypeCode; + display: Scalars['String']['output']; +}; export enum AccessTypeCode { /** @deprecated No longer supported */ @@ -59,20 +36,20 @@ export enum AccessTypeCode { } export type AccessUrl = { - __typename?: 'AccessUrl' + __typename?: 'AccessUrl'; /** If the resource requires login */ - loginRequired: Scalars['Boolean']['output'] + loginRequired: Scalars['Boolean']['output']; /** Notes for the resource */ - note?: Maybe + note?: Maybe; /** The origin, e.g. "DBC Webarkiv" */ - origin: Scalars['String']['output'] + origin: Scalars['String']['output']; /** Status from linkcheck */ - status: LinkStatus + status: LinkStatus; /** The type of content that can be found at this URL */ - type?: Maybe + type?: Maybe; /** The url where manifestation is located */ - url: Scalars['String']['output'] -} + url: Scalars['String']['output']; +}; export enum AccessUrlType { Image = 'IMAGE', @@ -84,46 +61,46 @@ export enum AccessUrlType { } export type Audience = { - __typename?: 'Audience' + __typename?: 'Audience'; /** PEGI age rating for games */ - PEGI?: Maybe + PEGI?: Maybe; /** Range of numbers with either beginning of range or end of range or both e.g. 6-10, 1980-1999 */ - ages: Array + ages: Array; /** Is this material for children or adults */ - childrenOrAdults: Array + childrenOrAdults: Array; /** Appropriate audience for this manifestation */ - generalAudience: Array + generalAudience: Array; /** LET number of this manifestion, defines the reability level, LET stands for læseegnethedstal */ - let?: Maybe + let?: Maybe; /** Level of difficulty, illustrations, length, and realism in children's literature */ - levelForChildren8to12?: Maybe + levelForChildren8to12?: Maybe; /** Appropriate audience as recommended by the library */ - libraryRecommendation?: Maybe + libraryRecommendation?: Maybe; /** Lix number of this manifestion, defines the reability level, Lix stands for læsbarhedsindex */ - lix?: Maybe + lix?: Maybe; /** Media council age recommendation */ - mediaCouncilAgeRestriction?: Maybe + mediaCouncilAgeRestriction?: Maybe; /** Number of players in the game. */ - players?: Maybe + players?: Maybe; /** Primary target audience for this manifestation */ - primaryTarget: Array + primaryTarget: Array; /** Is this material for use in schools (folkeskole/ungdomsuddannelse) or is this material for use in schools by the teacher (folkeskole only) */ - schoolUse: Array -} + schoolUse: Array; +}; export type CatalogueCodes = { - __typename?: 'CatalogueCodes' + __typename?: 'CatalogueCodes'; /** CatalogueCodes from the national registers */ - nationalBibliography: Array + nationalBibliography: Array; /** CatalogueCodes from local bibliographies or catalogues that the manifestation belongs to */ - otherCatalogues: Array -} + otherCatalogues: Array; +}; export type ChildOrAdult = { - __typename?: 'ChildOrAdult' - code: ChildOrAdultCode - display: Scalars['String']['output'] -} + __typename?: 'ChildOrAdult'; + code: ChildOrAdultCode; + display: Scalars['String']['output']; +}; export enum ChildOrAdultCode { ForAdults = 'FOR_ADULTS', @@ -131,32 +108,32 @@ export enum ChildOrAdultCode { } export type Classification = { - __typename?: 'Classification' + __typename?: 'Classification'; /** The classification code */ - code: Scalars['String']['output'] + code: Scalars['String']['output']; /** Descriptive text for the classification code (DK5 only) */ - display: Scalars['String']['output'] + display: Scalars['String']['output']; /** The dk5Heading for the classification (DK5 only) */ - dk5Heading?: Maybe + dk5Heading?: Maybe; /** For DK5 only. The DK5 entry type: main entry, national entry, or additional entry */ - entryType?: Maybe + entryType?: Maybe; /** Name of the classification system */ - system: Scalars['String']['output'] -} + system: Scalars['String']['output']; +}; /** The complete facet in response */ export type ComplexSearchFacetResponse = { - __typename?: 'ComplexSearchFacetResponse' - name?: Maybe - values?: Maybe> -} + __typename?: 'ComplexSearchFacetResponse'; + name?: Maybe; + values?: Maybe>; +}; /** A Facet value in response */ export type ComplexSearchFacetValue = { - __typename?: 'ComplexSearchFacetValue' - key: Scalars['String']['output'] - score: Scalars['Int']['output'] -} + __typename?: 'ComplexSearchFacetValue'; + key: Scalars['String']['output']; + score: Scalars['Int']['output']; +}; /** The supported facet fields */ export enum ComplexSearchFacets { @@ -202,79 +179,80 @@ export enum ComplexSearchFacets { /** Search Filters */ export type ComplexSearchFilters = { /** Id of agency. */ - agencyId?: InputMaybe> + agencyId?: InputMaybe>; /** Name of the branch. */ - branch?: InputMaybe> + branch?: InputMaybe>; /** BranchId. */ - branchId?: InputMaybe> + branchId?: InputMaybe>; /** Overall location in library (eg. Voksne). */ - department?: InputMaybe> + department?: InputMaybe>; /** Id of publishing issue. */ - issueId?: InputMaybe> + issueId?: InputMaybe>; /** Local id of the item. */ - itemId?: InputMaybe> + itemId?: InputMaybe>; /** Where is the book physically located (eg. skønlitteratur). */ - location?: InputMaybe> + location?: InputMaybe>; /** Onloan or OnShelf. */ - status?: InputMaybe> + status?: InputMaybe>; /** More specific location (eg. Fantasy). */ - sublocation?: InputMaybe> -} + sublocation?: InputMaybe>; +}; /** The search response */ export type ComplexSearchResponse = { - __typename?: 'ComplexSearchResponse' + __typename?: 'ComplexSearchResponse'; /** Error message, for instance if CQL is invalid */ - errorMessage?: Maybe + errorMessage?: Maybe; /** Facets for this response */ - facets?: Maybe> + facets?: Maybe>; /** Total number of works found. May be used for pagination. */ - hitcount: Scalars['Int']['output'] + hitcount: Scalars['Int']['output']; /** * Time for execution on solr * @deprecated No longer supported */ - solrExecutionDurationInMs?: Maybe + solrExecutionDurationInMs?: Maybe; /** * filter applied to the query * @deprecated No longer supported */ - solrFilter?: Maybe + solrFilter?: Maybe; /** * the query being executed * @deprecated No longer supported */ - solrQuery?: Maybe + solrQuery?: Maybe; /** * Time to tokenize query * @deprecated No longer supported */ - tokenizerDurationInMs?: Maybe + tokenizerDurationInMs?: Maybe; /** The works matching the given search query. Use offset and limit for pagination. */ - works: Array -} + works: Array; +}; + /** The search response */ export type ComplexSearchResponseWorksArgs = { - limit: Scalars['PaginationLimit']['input'] - offset: Scalars['Int']['input'] - sort?: InputMaybe> -} + limit: Scalars['PaginationLimit']['input']; + offset: Scalars['Int']['input']; + sort?: InputMaybe>; +}; export type ComplexSearchSuggestion = { - __typename?: 'ComplexSearchSuggestion' + __typename?: 'ComplexSearchSuggestion'; /** The suggested term which can be searched for */ - term: Scalars['String']['output'] + term: Scalars['String']['output']; /** The type of suggestion */ - type: Scalars['String']['output'] + type: Scalars['String']['output']; /** A work related to the term */ - work?: Maybe -} + work?: Maybe; +}; export type ComplexSuggestResponse = { - __typename?: 'ComplexSuggestResponse' - result: Array -} + __typename?: 'ComplexSuggestResponse'; + result: Array; +}; export enum ComplexSuggestionType { Contributor = 'contributor', @@ -293,27 +271,27 @@ export enum ComplexSuggestionType { } export type CopyRequestInput = { - authorOfComponent?: InputMaybe - issueOfComponent?: InputMaybe - openURL?: InputMaybe - pagesOfComponent?: InputMaybe - pickUpAgencySubdivision?: InputMaybe + authorOfComponent?: InputMaybe; + issueOfComponent?: InputMaybe; + openURL?: InputMaybe; + pagesOfComponent?: InputMaybe; + pickUpAgencySubdivision?: InputMaybe; /** The pid of an article or periodica */ - pid: Scalars['String']['input'] - publicationDateOfComponent?: InputMaybe - publicationTitle?: InputMaybe - publicationYearOfComponent?: InputMaybe - titleOfComponent?: InputMaybe - userInterestDate?: InputMaybe - userMail?: InputMaybe - userName?: InputMaybe - volumeOfComponent?: InputMaybe -} + pid: Scalars['String']['input']; + publicationDateOfComponent?: InputMaybe; + publicationTitle?: InputMaybe; + publicationYearOfComponent?: InputMaybe; + titleOfComponent?: InputMaybe; + userInterestDate?: InputMaybe; + userMail?: InputMaybe; + userName?: InputMaybe; + volumeOfComponent?: InputMaybe; +}; export type CopyRequestResponse = { - __typename?: 'CopyRequestResponse' - status: CopyRequestStatus -} + __typename?: 'CopyRequestResponse'; + status: CopyRequestStatus; +}; export enum CopyRequestStatus { BorchkUserBlockedByAgency = 'BORCHK_USER_BLOCKED_BY_AGENCY', @@ -331,99 +309,99 @@ export enum CopyRequestStatus { UnknownUser = 'UNKNOWN_USER' } -export type Corporation = Creator & - Subject & { - __typename?: 'Corporation' - /** Added information about the corporation, like M. Folmer Andersen (firma) */ - attributeToName?: Maybe - /** The full corporation or conference name */ - display: Scalars['String']['output'] - language?: Maybe - local?: Maybe - /** Location or jurisdiction of the corporation or conference, like Københavns Kommune, Statistisk Kontor */ - location?: Maybe - /** Main corporation or conference */ - main?: Maybe - /** The full corporation or conference name to sort after */ - nameSort: Scalars['String']['output'] - /** Number of the conference */ - number?: Maybe - /** A list of which kinds of contributions this corporation made to this creation */ - roles: Array - /** Sub corporation or conference/meeting */ - sub?: Maybe - type: SubjectType - /** Year of the conference */ - year?: Maybe - } +export type Corporation = Creator & Subject & { + __typename?: 'Corporation'; + /** Added information about the corporation, like M. Folmer Andersen (firma) */ + attributeToName?: Maybe; + /** The full corporation or conference name */ + display: Scalars['String']['output']; + language?: Maybe; + local?: Maybe; + /** Location or jurisdiction of the corporation or conference, like Københavns Kommune, Statistisk Kontor */ + location?: Maybe; + /** Main corporation or conference */ + main?: Maybe; + /** The full corporation or conference name to sort after */ + nameSort: Scalars['String']['output']; + /** Number of the conference */ + number?: Maybe; + /** A list of which kinds of contributions this corporation made to this creation */ + roles: Array; + /** Sub corporation or conference/meeting */ + sub?: Maybe; + type: SubjectType; + /** Year of the conference */ + year?: Maybe; +}; export type Cover = { - __typename?: 'Cover' - detail?: Maybe - detail_42?: Maybe - detail_117?: Maybe - detail_207?: Maybe - detail_500?: Maybe - origin?: Maybe - thumbnail?: Maybe -} + __typename?: 'Cover'; + detail?: Maybe; + detail_42?: Maybe; + detail_117?: Maybe; + detail_207?: Maybe; + detail_500?: Maybe; + origin?: Maybe; + thumbnail?: Maybe; +}; export type Creator = { /** Name of the creator */ - display: Scalars['String']['output'] + display: Scalars['String']['output']; /** Name of the creator which can be used to sort after */ - nameSort: Scalars['String']['output'] + nameSort: Scalars['String']['output']; /** A list of which kinds of contributions this creator made to this creation */ - roles: Array -} + roles: Array; +}; export type Dk5MainEntry = { - __typename?: 'DK5MainEntry' + __typename?: 'DK5MainEntry'; /** Main DK5 classification code */ - code: Scalars['String']['output'] + code: Scalars['String']['output']; /** Displayable main DK5 classification */ - display: Scalars['String']['output'] + display: Scalars['String']['output']; /** The dk5Heading for the classification */ - dk5Heading: Scalars['String']['output'] -} + dk5Heading: Scalars['String']['output']; +}; export type DidYouMean = { - __typename?: 'DidYouMean' + __typename?: 'DidYouMean'; /** An alternative query */ - query: Scalars['String']['output'] + query: Scalars['String']['output']; /** A probability score between 0-1 indicating how relevant the query is */ - score: Scalars['Float']['output'] -} + score: Scalars['Float']['output']; +}; export type DigitalArticleService = { - __typename?: 'DigitalArticleService' + __typename?: 'DigitalArticleService'; /** Issn which can be used to order article through Digital Article Service */ - issn: Scalars['String']['output'] -} + issn: Scalars['String']['output']; +}; export type Edition = { - __typename?: 'Edition' + __typename?: 'Edition'; /** Quotation of contributor statements related to the edition */ - contributors: Array + contributors: Array; /** The edition number and name */ - edition?: Maybe + edition?: Maybe; /** A note about this specific edition */ - note?: Maybe + note?: Maybe; /** A year as displayable text and as number */ - publicationYear?: Maybe + publicationYear?: Maybe; /** Properties 'edition', 'contributorsToEdition' and 'publicationYear' as one string, e.g.: '3. udgave, revideret af Hugin Eide, 2005' */ - summary: Scalars['String']['output'] -} + summary: Scalars['String']['output']; +}; export type ElbaServices = { - __typename?: 'ElbaServices' - placeCopyRequest: CopyRequestResponse -} + __typename?: 'ElbaServices'; + placeCopyRequest: CopyRequestResponse; +}; + export type ElbaServicesPlaceCopyRequestArgs = { - dryRun?: InputMaybe - input: CopyRequestInput -} + dryRun?: InputMaybe; + input: CopyRequestInput; +}; export enum EntryType { AdditionalEntry = 'ADDITIONAL_ENTRY', @@ -433,16 +411,16 @@ export enum EntryType { } export type Ereol = { - __typename?: 'Ereol' + __typename?: 'Ereol'; /** Is this a manifestation that always can be loaned on ereolen.dk even if you've run out of loans this month */ - canAlwaysBeLoaned: Scalars['Boolean']['output'] + canAlwaysBeLoaned: Scalars['Boolean']['output']; /** Notes for the resource */ - note?: Maybe + note?: Maybe; /** The origin, e.g. "Ereolen" or "Ereolen Go" */ - origin: Scalars['String']['output'] + origin: Scalars['String']['output']; /** The url where manifestation is located */ - url: Scalars['String']['output'] -} + url: Scalars['String']['output']; +}; /** The supported facet fields */ export enum FacetField { @@ -470,36 +448,37 @@ export enum FacetField { /** The result for a specific facet */ export type FacetResult = { - __typename?: 'FacetResult' + __typename?: 'FacetResult'; /** The name of the facet. */ - name: Scalars['String']['output'] + name: Scalars['String']['output']; /** The values of thie facet result */ - values: Array -} + values: Array; +}; + /** The result for a specific facet */ export type FacetResultValuesArgs = { - limit: Scalars['Int']['input'] -} + limit: Scalars['Int']['input']; +}; /** A facet value consists of a term and a count. */ export type FacetValue = { - __typename?: 'FacetValue' + __typename?: 'FacetValue'; /** Use the key when applying filters */ - key: Scalars['String']['output'] + key: Scalars['String']['output']; /** A score indicating relevance */ - score?: Maybe + score?: Maybe; /** A value of a facet field */ - term: Scalars['String']['output'] -} + term: Scalars['String']['output']; +}; export type FictionNonfiction = { - __typename?: 'FictionNonfiction' + __typename?: 'FictionNonfiction'; /** Binary code fiction/nonfiction used for filtering */ - code: FictionNonfictionCode + code: FictionNonfictionCode; /** Displayable overall category/genre. In Danish skønlitteratur/faglitteratur for literature, fiktion/nonfiktion for other types. */ - display: Scalars['String']['output'] -} + display: Scalars['String']['output']; +}; export enum FictionNonfictionCode { Fiction = 'FICTION', @@ -508,12 +487,12 @@ export enum FictionNonfictionCode { } export type GeneralMaterialType = { - __typename?: 'GeneralMaterialType' + __typename?: 'GeneralMaterialType'; /** code for materialType # @TODO - is this a finite list ?? - and where to get it */ - code: GeneralMaterialTypeCode + code: GeneralMaterialTypeCode; /** Ths string to display */ - display: Scalars['String']['output'] -} + display: Scalars['String']['output']; +}; export enum GeneralMaterialTypeCode { Articles = 'ARTICLES', @@ -541,40 +520,40 @@ export enum HoldingsStatus { } export type HostPublication = { - __typename?: 'HostPublication' + __typename?: 'HostPublication'; /** Creator of the host publication if host publication is book */ - creator?: Maybe + creator?: Maybe; /** Edition statement for the host publication */ - edition?: Maybe + edition?: Maybe; /** ISBN of the publication this manifestation can be found in */ - isbn?: Maybe + isbn?: Maybe; /** ISSN of the publication this manifestation can be found in */ - issn?: Maybe + issn?: Maybe; /** The issue of the publication this manifestation can be found in */ - issue?: Maybe + issue?: Maybe; /** Notes about the publication where this manifestation can be found in */ - notes?: Maybe> + notes?: Maybe>; /** The pages in the publication where this manifestation can be found in */ - pages?: Maybe + pages?: Maybe; /** The publisher of the publication where this manifestation can be found in */ - publisher?: Maybe + publisher?: Maybe; /** Series of the publication this manifestation can be found in */ - series?: Maybe + series?: Maybe; /** All details about the publication this manifestation can be found in */ - summary: Scalars['String']['output'] + summary: Scalars['String']['output']; /** Publication this manifestation can be found in */ - title: Scalars['String']['output'] + title: Scalars['String']['output']; /** The publication year of the publication this manifestation can be found in */ - year?: Maybe -} + year?: Maybe; +}; export type Identifier = { - __typename?: 'Identifier' + __typename?: 'Identifier'; /** The type of identifier */ - type: IdentifierType + type: IdentifierType; /** The actual identifier */ - value: Scalars['String']['output'] -} + value: Scalars['String']['output']; +}; export enum IdentifierType { Barcode = 'BARCODE', @@ -592,18 +571,18 @@ export enum IdentifierType { } export type InfomediaArticle = { - __typename?: 'InfomediaArticle' - byLine?: Maybe - dateLine?: Maybe - headLine?: Maybe - hedLine?: Maybe - html?: Maybe - id: Scalars['String']['output'] - logo?: Maybe - paper?: Maybe - subHeadLine?: Maybe - text?: Maybe -} + __typename?: 'InfomediaArticle'; + byLine?: Maybe; + dateLine?: Maybe; + headLine?: Maybe; + hedLine?: Maybe; + html?: Maybe; + id: Scalars['String']['output']; + logo?: Maybe; + paper?: Maybe; + subHeadLine?: Maybe; + text?: Maybe; +}; export enum InfomediaError { BorrowercheckNotAllowed = 'BORROWERCHECK_NOT_ALLOWED', @@ -619,36 +598,36 @@ export enum InfomediaError { } export type InfomediaResponse = { - __typename?: 'InfomediaResponse' - article?: Maybe + __typename?: 'InfomediaResponse'; + article?: Maybe; /** Infomedia error */ - error?: Maybe -} + error?: Maybe; +}; export type InfomediaService = { - __typename?: 'InfomediaService' + __typename?: 'InfomediaService'; /** Infomedia ID which can be used to fetch article through Infomedia Service */ - id: Scalars['String']['output'] -} + id: Scalars['String']['output']; +}; export type InterLibraryLoan = { - __typename?: 'InterLibraryLoan' + __typename?: 'InterLibraryLoan'; /** Is true when manifestation can be borrowed via ill */ - loanIsPossible: Scalars['Boolean']['output'] -} + loanIsPossible: Scalars['Boolean']['output']; +}; export type KidRecommenderTags = { - tag?: InputMaybe - weight?: InputMaybe -} + tag?: InputMaybe; + weight?: InputMaybe; +}; export type Language = { - __typename?: 'Language' + __typename?: 'Language'; /** Language as displayable text */ - display: Scalars['String']['output'] + display: Scalars['String']['output']; /** ISO639-2 language code */ - isoCode: Scalars['String']['output'] -} + isoCode: Scalars['String']['output']; +}; export enum LanguageCode { Da = 'da', @@ -656,51 +635,52 @@ export enum LanguageCode { } export type Languages = { - __typename?: 'Languages' + __typename?: 'Languages'; /** Summary/abstract languages of this manifestation, if the manifestation contains short summaries of the content in another language */ - abstract?: Maybe> + abstract?: Maybe>; /** Main language of this manifestation */ - main?: Maybe> + main?: Maybe>; /** Notes of the languages that describe subtitles, spoken/written (original, dubbed/synchonized), visual interpretation, parallel (notes are written in Danish) */ - notes?: Maybe> + notes?: Maybe>; /** Original language of this manifestation */ - original?: Maybe> + original?: Maybe>; /** Parallel languages of this manifestation, if more languages are printed in the same book */ - parallel?: Maybe> + parallel?: Maybe>; /** Spoken language in this manifestation e.g. dubbed/syncronized language in movie */ - spoken?: Maybe> + spoken?: Maybe>; /** Subtitles in this manifestation */ - subtitles?: Maybe> -} + subtitles?: Maybe>; +}; export type LevelForAudience = { - __typename?: 'LevelForAudience' + __typename?: 'LevelForAudience'; /** Level expressed as integer on a scale from 1 to 5 */ - difficulty?: Maybe + difficulty?: Maybe; /** Level expressed as integer on a scale from 1 to 5 */ - illustrationsLevel?: Maybe + illustrationsLevel?: Maybe; /** Level expressed as integer on a scale from 1 to 5 */ - length?: Maybe + length?: Maybe; /** Level expressed as integer on a scale from 1 to 5 */ - realisticVsFictional?: Maybe -} + realisticVsFictional?: Maybe; +}; export type LinkCheckResponse = { - __typename?: 'LinkCheckResponse' - brokenSince?: Maybe - lastCheckedAt?: Maybe - status: LinkCheckStatus - url: Scalars['String']['output'] -} + __typename?: 'LinkCheckResponse'; + brokenSince?: Maybe; + lastCheckedAt?: Maybe; + status: LinkCheckStatus; + url: Scalars['String']['output']; +}; export type LinkCheckService = { - __typename?: 'LinkCheckService' - checks: Array -} + __typename?: 'LinkCheckService'; + checks: Array; +}; + export type LinkCheckServiceChecksArgs = { - urls?: InputMaybe> -} + urls?: InputMaybe>; +}; export enum LinkCheckStatus { Broken = 'BROKEN', @@ -717,118 +697,118 @@ export enum LinkStatus { } export type Manifestation = { - __typename?: 'Manifestation' + __typename?: 'Manifestation'; /** Abstract of the entity */ - abstract: Array + abstract: Array; /** Different options to access manifestation */ - access: Array + access: Array; /** Access type of this manifestation */ - accessTypes: Array + accessTypes: Array; /** Different kinds of definitions of appropriate audience for this manifestation */ - audience?: Maybe + audience?: Maybe; /** CatalogueCodes divided in codes from the national bibliography and other codes */ - catalogueCodes: CatalogueCodes + catalogueCodes: CatalogueCodes; /** Classification codes for this manifestation from any classification system */ - classifications: Array + classifications: Array; /** Contributors to the manifestation, actors, illustrators etc */ - contributors: Array + contributors: Array; /** Additional contributors of this manifestation as described on the publication. E.g. 'på dansk ved Vivi Berendt' */ - contributorsFromDescription: Array + contributorsFromDescription: Array; /** Cover for this manifestation */ - cover: Cover + cover: Cover; /** Primary creators of the manifestation e.g. authors, directors, musicians etc */ - creators: Array + creators: Array; /** Additional creators of this manifestation as described on the publication. E.g. 'tekst af William Warren' */ - creatorsFromDescription: Array + creatorsFromDescription: Array; /** The year for the publication of the first edition for this work */ - dateFirstEdition?: Maybe + dateFirstEdition?: Maybe; /** Edition details for this manifestation */ - edition?: Maybe + edition?: Maybe; /** Overall literary category/genre of this manifestation. e.g. fiction or nonfiction. In Danish skønlitteratur/faglitteratur for literature, fiktion/nonfiktion for other types. */ - fictionNonfiction?: Maybe + fictionNonfiction?: Maybe; /** The genre, (literary) form, type etc. of this manifestation */ - genreAndForm: Array + genreAndForm: Array; /** Details about the host publications of this manifestation */ - hostPublication?: Maybe + hostPublication?: Maybe; /** Identifiers for this manifestation - often used for search indexes */ - identifiers: Array + identifiers: Array; /** Languages in this manifestation */ - languages?: Maybe + languages?: Maybe; /** Details about the latest printing of this manifestation */ - latestPrinting?: Maybe + latestPrinting?: Maybe; /** Tracks on music album, sheet music content, or articles/short stories etc. in this manifestation */ - manifestationParts?: Maybe + manifestationParts?: Maybe; /** The type of material of the manifestation based on bibliotek.dk types */ - materialTypes: Array + materialTypes: Array; /** Notes about the manifestation */ - notes: Array + notes: Array; /** The work that this manifestation is part of */ - ownerWork: Work + ownerWork: Work; /** Physical description of this manifestation like extent (pages/minutes), illustrations etc. */ - physicalDescription?: Maybe + physicalDescription?: Maybe; /** * Physical description of this manifestation like extent (pages/minutes), illustrations etc. * @deprecated Use 'physicalDescription' instead */ - physicalDescriptions: Array + physicalDescriptions: Array; /** Unique identification of the manifestation e.g 870970-basis:54029519 */ - pid: Scalars['String']['output'] + pid: Scalars['String']['output']; /** Publisher of this manifestion */ - publisher: Array + publisher: Array; /** The creation date of the record describing this manifestation in the format YYYYMMDD */ - recordCreationDate: Scalars['String']['output'] + recordCreationDate: Scalars['String']['output']; /** Notes about relations to this book/periodical/journal, - like previous names or related journals */ - relatedPublications: Array + relatedPublications: Array; /** Relations to other manifestations */ - relations: Relations + relations: Relations; /** Some review data, if this manifestation is a review */ - review?: Maybe + review?: Maybe; /** Series for this manifestation */ - series: Array + series: Array; /** Information about on which shelf in the library this manifestation can be found */ - shelfmark?: Maybe + shelfmark?: Maybe; /** The source of the manifestation, e.g. own library catalogue (Bibliotekskatalog) or online source e.g. Filmstriben, Ebook Central, eReolen Global etc. */ - source: Array + source: Array; /** Subjects for this manifestation */ - subjects: SubjectContainer + subjects: SubjectContainer; /** Quotation of the manifestation's table of contents or a similar content list */ - tableOfContents?: Maybe + tableOfContents?: Maybe; /** Different kinds of titles for this work */ - titles: ManifestationTitles + titles: ManifestationTitles; /** id of the manifestaion unit */ - unit?: Maybe + unit?: Maybe; /** * Universe for this manifestation * @deprecated Use 'universes' instead */ - universe?: Maybe + universe?: Maybe; /** Universes for this manifestation */ - universes: Array + universes: Array; /** Information about on which volume this manifestation is in multi volume work */ - volume?: Maybe + volume?: Maybe; /** Worktypes for this manifestations work */ - workTypes: Array + workTypes: Array; /** The year this manifestation was originally published or produced */ - workYear?: Maybe -} + workYear?: Maybe; +}; export type ManifestationPart = { - __typename?: 'ManifestationPart' + __typename?: 'ManifestationPart'; /** Classification of this entry (music track or literary analysis) */ - classifications: Array + classifications: Array; /** Contributors from description - additional contributor to this entry */ - contributorsFromDescription: Array + contributorsFromDescription: Array; /** The creator of the music track or literary analysis */ - creators: Array + creators: Array; /** Additional creator or contributor to this entry (music track or literary analysis) as described on the publication. E.g. 'arr.: H. Cornell' */ - creatorsFromDescription: Array + creatorsFromDescription: Array; /** The playing time for this specific part (i.e. the duration of a music track) */ - playingTime?: Maybe + playingTime?: Maybe; /** Subjects of this entry (music track or literary analysis) */ - subjects?: Maybe> + subjects?: Maybe>; /** The title of the entry (music track or title of a literary analysis) */ - title: Scalars['String']['output'] -} + title: Scalars['String']['output']; +}; export enum ManifestationPartType { MusicTracks = 'MUSIC_TRACKS', @@ -838,111 +818,112 @@ export enum ManifestationPartType { } export type ManifestationParts = { - __typename?: 'ManifestationParts' + __typename?: 'ManifestationParts'; /** Heading for the music content note */ - heading?: Maybe + heading?: Maybe; /** The creator and title etc of the individual parts */ - parts: Array + parts: Array; /** The type of manifestation parts, is this music tracks, book parts etc. */ - type: ManifestationPartType -} + type: ManifestationPartType; +}; export type ManifestationReview = { - __typename?: 'ManifestationReview' - rating?: Maybe - reviewByLibrarians?: Maybe>> -} + __typename?: 'ManifestationReview'; + rating?: Maybe; + reviewByLibrarians?: Maybe>>; +}; export type ManifestationTitles = { - __typename?: 'ManifestationTitles' + __typename?: 'ManifestationTitles'; /** Alternative titles for this manifestation e.g. a title in a different language */ - alternative: Array + alternative: Array; /** The full title(s) of the manifestation including subtitles etc */ - full: Array + full: Array; /** Information that distinguishes this manifestation from a similar manifestation with same title, e.g. 'illustrated by Ted Kirby' */ - identifyingAddition?: Maybe + identifyingAddition?: Maybe; /** The main title(s) of the work */ - main: Array + main: Array; /** The title of the work that this expression/manifestation is translated from or based on. The original title(s) of a film which has a different distribution title. */ - original?: Maybe> + original?: Maybe>; /** Titles (in other languages) parallel to the main 'title' of the manifestation */ - parallel: Array + parallel: Array; /** The sorted title of the entity */ - sort: Scalars['String']['output'] + sort: Scalars['String']['output']; /** The standard title of the entity, used for music and movies */ - standard?: Maybe + standard?: Maybe; /** The title of the entity with the language of the entity in parenthesis after. This field is only generated for non-danish titles. */ - titlePlusLanguage?: Maybe + titlePlusLanguage?: Maybe; /** Danish translation of the main title */ - translated?: Maybe> + translated?: Maybe>; /** detailed title for tv series */ - tvSeries?: Maybe -} + tvSeries?: Maybe; +}; export type Manifestations = { - __typename?: 'Manifestations' - all: Array - bestRepresentation: Manifestation - first: Manifestation - latest: Manifestation - mostRelevant: Array -} + __typename?: 'Manifestations'; + all: Array; + bestRepresentation: Manifestation; + first: Manifestation; + latest: Manifestation; + mostRelevant: Array; +}; export type MaterialType = { - __typename?: 'MaterialType' + __typename?: 'MaterialType'; /** * The general type of material of the manifestation based on a grouping of bibliotek.dk material types, e.g. bøger, lydbøger etc. * @TODO - this on is deprecated pr. 1/2 '24 * @deprecated Use 'materialTypeGenerel' instead */ - general: Scalars['String']['output'] + general: Scalars['String']['output']; /** jed 1.1 - the general materialtype */ - materialTypeGeneral: GeneralMaterialType + materialTypeGeneral: GeneralMaterialType; /** jed 1.1 - the specific materialtType */ - materialTypeSpecific: SpecificMaterialType + materialTypeSpecific: SpecificMaterialType; /** * The type of material of the manifestation based on bibliotek.dk types * @TODO - this on is deprecated pr. 1/2 '24 * @deprecated Use 'materialtTypeSpecific' instead */ - specific: Scalars['String']['output'] -} + specific: Scalars['String']['output']; +}; export type MediaCouncilAgeRestriction = { - __typename?: 'MediaCouncilAgeRestriction' + __typename?: 'MediaCouncilAgeRestriction'; /** Display string for minimum age */ - display?: Maybe + display?: Maybe; /** Minimum age */ - minimumAge?: Maybe -} + minimumAge?: Maybe; +}; export type Mood = Subject & { - __typename?: 'Mood' - display: Scalars['String']['output'] - language?: Maybe - local?: Maybe - type: SubjectType -} + __typename?: 'Mood'; + display: Scalars['String']['output']; + language?: Maybe; + local?: Maybe; + type: SubjectType; +}; export type MoodKidsRecommendFilters = { - difficulty?: InputMaybe> - fictionNonfiction?: InputMaybe - illustrationsLevel?: InputMaybe> - length?: InputMaybe> - realisticVsFictional?: InputMaybe> -} + difficulty?: InputMaybe>; + fictionNonfiction?: InputMaybe; + illustrationsLevel?: InputMaybe>; + length?: InputMaybe>; + realisticVsFictional?: InputMaybe>; +}; /** The reponse from moodrecommenkids */ export type MoodRecommendKidsResponse = { - __typename?: 'MoodRecommendKidsResponse' - works: Array -} + __typename?: 'MoodRecommendKidsResponse'; + works: Array; +}; + /** The reponse from moodrecommenkids */ export type MoodRecommendKidsResponseWorksArgs = { - limit: Scalars['PaginationLimit']['input'] - offset: Scalars['Int']['input'] -} + limit: Scalars['PaginationLimit']['input']; + offset: Scalars['Int']['input']; +}; /** Supported fields for moodsearch request */ export enum MoodSearchFieldValues { @@ -955,28 +936,30 @@ export enum MoodSearchFieldValues { /** The reponse from moodsearchkids */ export type MoodSearchKidsResponse = { - __typename?: 'MoodSearchKidsResponse' - works: Array -} + __typename?: 'MoodSearchKidsResponse'; + works: Array; +}; + /** The reponse from moodsearchkids */ export type MoodSearchKidsResponseWorksArgs = { - limit: Scalars['PaginationLimit']['input'] - offset: Scalars['Int']['input'] -} + limit: Scalars['PaginationLimit']['input']; + offset: Scalars['Int']['input']; +}; /** The response from moodsearch */ export type MoodSearchResponse = { - __typename?: 'MoodSearchResponse' + __typename?: 'MoodSearchResponse'; /** The works matching the given search query. Use offset and limit for pagination. */ - works: Array -} + works: Array; +}; + /** The response from moodsearch */ export type MoodSearchResponseWorksArgs = { - limit: Scalars['PaginationLimit']['input'] - offset: Scalars['Int']['input'] -} + limit: Scalars['PaginationLimit']['input']; + offset: Scalars['Int']['input']; +}; /** Type of moodSuggest response */ export enum MoodSuggest { @@ -987,47 +970,48 @@ export enum MoodSuggest { /** The response type for moodSuggest */ export type MoodSuggestResponse = { - __typename?: 'MoodSuggestResponse' + __typename?: 'MoodSuggestResponse'; /** Response is an array of moodSuggestResponse */ - response: Array -} + response: Array; +}; /** Response type for moodTagRecommend */ export type MoodTagRecommendResponse = { - __typename?: 'MoodTagRecommendResponse' - similarity?: Maybe - work: Work -} + __typename?: 'MoodTagRecommendResponse'; + similarity?: Maybe; + work: Work; +}; export type Mutation = { - __typename?: 'Mutation' - elba: ElbaServices + __typename?: 'Mutation'; + elba: ElbaServices; /** @deprecated Use 'Elba.placeCopyRequest' instead */ - submitPeriodicaArticleOrder: PeriodicaArticleOrderResponse -} + submitPeriodicaArticleOrder: PeriodicaArticleOrderResponse; +}; + export type MutationSubmitPeriodicaArticleOrderArgs = { - dryRun?: InputMaybe - input: PeriodicaArticleOrder -} + dryRun?: InputMaybe; + input: PeriodicaArticleOrder; +}; export type NarrativeTechnique = Subject & { - __typename?: 'NarrativeTechnique' - display: Scalars['String']['output'] - language?: Maybe - local?: Maybe - type: SubjectType -} + __typename?: 'NarrativeTechnique'; + display: Scalars['String']['output']; + language?: Maybe; + local?: Maybe; + type: SubjectType; +}; export type Note = { - __typename?: 'Note' + __typename?: 'Note'; /** The actual notes */ - display: Array + display: Array; /** Heading before note */ - heading?: Maybe + heading?: Maybe; /** The type of note - e.g. note about language, genre etc, NOT_SPECIFIED if not known. */ - type: NoteType -} + type: NoteType; +}; export enum NoteType { ConnectionToOtherWorks = 'CONNECTION_TO_OTHER_WORKS', @@ -1048,38 +1032,38 @@ export enum NoteType { } export type NumberInSeries = { - __typename?: 'NumberInSeries' + __typename?: 'NumberInSeries'; /** The number in the series as text, quoted form the publication, e.g. 'Vol. IX' */ - display: Scalars['String']['output'] + display: Scalars['String']['output']; /** The number in the series as integer */ - number?: Maybe> -} + number?: Maybe>; +}; export type Pegi = { - __typename?: 'PEGI' + __typename?: 'PEGI'; /** Display string for PEGI minimum age */ - display?: Maybe + display?: Maybe; /** Minimum age to play the game. PEGI rating */ - minimumAge?: Maybe -} + minimumAge?: Maybe; +}; export type PeriodicaArticleOrder = { - authorOfComponent?: InputMaybe - pagination?: InputMaybe - pickUpBranch: Scalars['String']['input'] + authorOfComponent?: InputMaybe; + pagination?: InputMaybe; + pickUpBranch: Scalars['String']['input']; /** The pid of an article or periodica */ - pid: Scalars['String']['input'] - publicationDateOfComponent?: InputMaybe - titleOfComponent?: InputMaybe - userMail?: InputMaybe - userName?: InputMaybe - volume?: InputMaybe -} + pid: Scalars['String']['input']; + publicationDateOfComponent?: InputMaybe; + titleOfComponent?: InputMaybe; + userMail?: InputMaybe; + userName?: InputMaybe; + volume?: InputMaybe; +}; export type PeriodicaArticleOrderResponse = { - __typename?: 'PeriodicaArticleOrderResponse' - status: PeriodicaArticleOrderStatus -} + __typename?: 'PeriodicaArticleOrderResponse'; + status: PeriodicaArticleOrderStatus; +}; export enum PeriodicaArticleOrderStatus { ErrorAgencyNotSubscribed = 'ERROR_AGENCY_NOT_SUBSCRIBED', @@ -1090,304 +1074,317 @@ export enum PeriodicaArticleOrderStatus { Ok = 'OK' } -export type Person = Creator & - Subject & { - __typename?: 'Person' - /** Creator aliases, creators behind used pseudonym */ - aliases: Array - /** Added information about the person, like Henri, konge af Frankrig */ - attributeToName?: Maybe - /** Birth year of the person */ - birthYear?: Maybe - /** The person's whole name in normal order */ - display: Scalars['String']['output'] - /** First name of the person */ - firstName?: Maybe - language?: Maybe - /** Last name of the person */ - lastName?: Maybe - local?: Maybe - /** The person's full name inverted */ - nameSort: Scalars['String']['output'] - /** A list of which kinds of contributions this person made to this creation */ - roles: Array - /** A roman numeral added to the person, like Christian IV */ - romanNumeral?: Maybe - type: SubjectType - } +export type Person = Creator & Subject & { + __typename?: 'Person'; + /** Creator aliases, creators behind used pseudonym */ + aliases: Array; + /** Added information about the person, like Henri, konge af Frankrig */ + attributeToName?: Maybe; + /** Birth year of the person */ + birthYear?: Maybe; + /** The person's whole name in normal order */ + display: Scalars['String']['output']; + /** First name of the person */ + firstName?: Maybe; + language?: Maybe; + /** Last name of the person */ + lastName?: Maybe; + local?: Maybe; + /** The person's full name inverted */ + nameSort: Scalars['String']['output']; + /** A list of which kinds of contributions this person made to this creation */ + roles: Array; + /** A roman numeral added to the person, like Christian IV */ + romanNumeral?: Maybe; + type: SubjectType; +}; export type PhysicalDescription = { - __typename?: 'PhysicalDescription' + __typename?: 'PhysicalDescription'; /** Material that comes with the manifestation (bilag) */ - accompanyingMaterial?: Maybe + accompanyingMaterial?: Maybe; /** Additional physical description of the manifestation (e.g illustrations etc) */ - additionalDescription?: Maybe + additionalDescription?: Maybe; /** Extent of the manifestation like pages and number of items */ - extent?: Maybe + extent?: Maybe; /** Number of pages of the manifestation as number */ - numberOfPages?: Maybe + numberOfPages?: Maybe; /** Number of units, like 3 cassettes, or 1 score etc. */ - numberOfUnits?: Maybe + numberOfUnits?: Maybe; /** The playing time of the manifestation (e.g 2 hours 5 minutes) */ - playingTime?: Maybe + playingTime?: Maybe; /** The necessary equipment to use the material */ - requirements?: Maybe + requirements?: Maybe; /** Size of the manifestation */ - size?: Maybe + size?: Maybe; /** A summary of the physical description of this manifestation like extent (pages/minutes), illustrations etc. */ - summary: Scalars['String']['output'] + summary: Scalars['String']['output']; /** Technical information about the manifestation (e.g blu-ray disc) */ - technicalInformation?: Maybe + technicalInformation?: Maybe; /** Ratio of text vs. illustration from 1-5 as a number, where 1 means no illustrations and 5 means illustrations on all pages */ - textVsIllustrations?: Maybe -} + textVsIllustrations?: Maybe; +}; export type PhysicalUnitDescription = { - __typename?: 'PhysicalUnitDescription' - accompanyingMaterial?: Maybe - materialUnits?: Maybe> - numberOfPages?: Maybe - summaryFull?: Maybe -} + __typename?: 'PhysicalUnitDescription'; + accompanyingMaterial?: Maybe; + materialUnits?: Maybe>; + numberOfPages?: Maybe; + summaryFull?: Maybe; +}; export type Players = { - __typename?: 'Players' + __typename?: 'Players'; /** Number of players interval begin. */ - begin?: Maybe + begin?: Maybe; /** Display name for the number of players. */ - display?: Maybe + display?: Maybe; /** Number of players interval end. */ - end?: Maybe -} + end?: Maybe; +}; export type Printing = { - __typename?: 'Printing' + __typename?: 'Printing'; /** The printing number and name */ - printing: Scalars['String']['output'] + printing: Scalars['String']['output']; /** A year as displayable text and as number */ - publicationYear?: Maybe + publicationYear?: Maybe; /** Publisher of printing when other than the original publisher of the edition (260*b) */ - publisher?: Maybe + publisher?: Maybe; /** Properties 'printing' and 'publicationYear' as one string, e.g.: '11. oplag, 2020' */ - summary: Scalars['String']['output'] -} + summary: Scalars['String']['output']; +}; export type PublicationYear = { - __typename?: 'PublicationYear' - display: Scalars['String']['output'] - endYear?: Maybe - frequency?: Maybe - year?: Maybe -} + __typename?: 'PublicationYear'; + display: Scalars['String']['output']; + endYear?: Maybe; + frequency?: Maybe; + year?: Maybe; +}; export type Query = { - __typename?: 'Query' - complexSearch: ComplexSearchResponse - complexSuggest: ComplexSuggestResponse - infomedia: InfomediaResponse - linkCheck: LinkCheckService - localSuggest: LocalSuggestResponse - manifestation?: Maybe - manifestations: Array> - mood: MoodQueries + __typename?: 'Query'; + complexSearch: ComplexSearchResponse; + complexSuggest: ComplexSuggestResponse; + infomedia: InfomediaResponse; + linkCheck: LinkCheckService; + localSuggest: LocalSuggestResponse; + manifestation?: Maybe; + manifestations: Array>; + mood: MoodQueries; /** Get recommendations */ - recommend: RecommendationResponse - refWorks: Scalars['String']['output'] - relatedSubjects?: Maybe> - ris: Scalars['String']['output'] - search: SearchResponse - suggest: SuggestResponse - work?: Maybe - works: Array> -} + recommend: RecommendationResponse; + refWorks: Scalars['String']['output']; + relatedSubjects?: Maybe>; + ris: Scalars['String']['output']; + search: SearchResponse; + suggest: SuggestResponse; + work?: Maybe; + works: Array>; +}; + export type QueryComplexSearchArgs = { - cql: Scalars['String']['input'] - facets?: InputMaybe - filters?: InputMaybe -} + cql: Scalars['String']['input']; + facets?: InputMaybe; + filters?: InputMaybe; +}; + export type QueryComplexSuggestArgs = { - q: Scalars['String']['input'] - type: ComplexSuggestionType -} + q: Scalars['String']['input']; + type: ComplexSuggestionType; +}; + export type QueryInfomediaArgs = { - id: Scalars['String']['input'] -} + id: Scalars['String']['input']; +}; + export type QueryLocalSuggestArgs = { - branchId?: InputMaybe - limit?: InputMaybe - q: Scalars['String']['input'] - suggestType?: InputMaybe> -} + branchId?: InputMaybe; + limit?: InputMaybe; + q: Scalars['String']['input']; + suggestType?: InputMaybe>; +}; + export type QueryManifestationArgs = { - faust?: InputMaybe - pid?: InputMaybe -} + faust?: InputMaybe; + pid?: InputMaybe; +}; + export type QueryManifestationsArgs = { - faust?: InputMaybe> - pid?: InputMaybe> -} + faust?: InputMaybe>; + pid?: InputMaybe>; +}; + export type QueryRecommendArgs = { - branchId?: InputMaybe - faust?: InputMaybe - id?: InputMaybe - limit?: InputMaybe - pid?: InputMaybe -} + branchId?: InputMaybe; + faust?: InputMaybe; + id?: InputMaybe; + limit?: InputMaybe; + pid?: InputMaybe; +}; + export type QueryRefWorksArgs = { - pids: Array -} + pids: Array; +}; + export type QueryRelatedSubjectsArgs = { - limit?: InputMaybe - q: Array -} + limit?: InputMaybe; + q: Array; +}; + export type QueryRisArgs = { - pids: Array -} + pids: Array; +}; + export type QuerySearchArgs = { - filters?: InputMaybe - q: SearchQuery - search_exact?: InputMaybe -} + filters?: InputMaybe; + q: SearchQuery; + search_exact?: InputMaybe; +}; + export type QuerySuggestArgs = { - limit?: InputMaybe - q: Scalars['String']['input'] - suggestType?: InputMaybe - suggestTypes?: InputMaybe> - workType?: InputMaybe -} + limit?: InputMaybe; + q: Scalars['String']['input']; + suggestType?: InputMaybe; + suggestTypes?: InputMaybe>; + workType?: InputMaybe; +}; + export type QueryWorkArgs = { - faust?: InputMaybe - id?: InputMaybe - language?: InputMaybe - oclc?: InputMaybe - pid?: InputMaybe -} + faust?: InputMaybe; + id?: InputMaybe; + language?: InputMaybe; + oclc?: InputMaybe; + pid?: InputMaybe; +}; + export type QueryWorksArgs = { - faust?: InputMaybe> - id?: InputMaybe> - language?: InputMaybe - oclc?: InputMaybe> - pid?: InputMaybe> -} + faust?: InputMaybe>; + id?: InputMaybe>; + language?: InputMaybe; + oclc?: InputMaybe>; + pid?: InputMaybe>; +}; export type Range = { - __typename?: 'Range' - begin?: Maybe - display: Scalars['String']['output'] - end?: Maybe -} + __typename?: 'Range'; + begin?: Maybe; + display: Scalars['String']['output']; + end?: Maybe; +}; export type Recommendation = { - __typename?: 'Recommendation' + __typename?: 'Recommendation'; /** The recommended manifestation */ - manifestation: Manifestation + manifestation: Manifestation; /** Info on how this recommendation was generated */ - reader: Array + reader: Array; /** The recommended work */ - work: Work -} + work: Work; +}; export type RecommendationResponse = { - __typename?: 'RecommendationResponse' - result: Array -} + __typename?: 'RecommendationResponse'; + result: Array; +}; export type RelatedPublication = { - __typename?: 'RelatedPublication' + __typename?: 'RelatedPublication'; /** Faust of the related publication */ - faust?: Maybe + faust?: Maybe; /** Notes describing the relation of the related periodical/journal/publication */ - heading: Scalars['String']['output'] + heading: Scalars['String']['output']; /** ISBN of the related publication */ - isbn?: Maybe + isbn?: Maybe; /** ISSN of the related periodical/journal/publication */ - issn?: Maybe + issn?: Maybe; /** Title of the related periodical/journal */ - title: Array + title: Array; /** URL of the related publication */ - url?: Maybe + url?: Maybe; /** Note regarding the URL of the related publication */ - urlText?: Maybe -} + urlText?: Maybe; +}; export type Relations = { - __typename?: 'Relations' + __typename?: 'Relations'; /** The story of this article is continued in this or these other article(s) */ - continuedIn: Array + continuedIn: Array; /** This story of this article actually started in this or these other article(s) */ - continues: Array + continues: Array; /** The contents of this articles is also discussed in these articles */ - discussedIn: Array + discussedIn: Array; /** The article discusses the content of these articles */ - discusses: Array + discusses: Array; /** This story is adapted in this or these movie(s) */ - hasAdaptation: Array + hasAdaptation: Array; /** The contents of this manifestation is analysed in these manifestations */ - hasAnalysis: Array + hasAnalysis: Array; /** The creator of this manifestation is portrayed in these manifestations */ - hasCreatorDescription: Array + hasCreatorDescription: Array; /** The publisher of this manifestation has made a description of the content */ - hasDescriptionFromPublisher: Array + hasDescriptionFromPublisher: Array; /** This movie is based on this manuscript */ - hasManuscript: Array + hasManuscript: Array; /** This manifestation has a 'materialevurdering' that was originally made for another manifestation, but it is still relevant (e.g. book/ebook) */ - hasReusedReview: Array + hasReusedReview: Array; /** This manifestation has these reviews */ - hasReview: Array + hasReview: Array; /** This movie or game has this sound track */ - hasSoundtrack: Array + hasSoundtrack: Array; /** This album has these tracks */ - hasTrack: Array + hasTrack: Array; /** This movie is based on this or these books */ - isAdaptationOf: Array + isAdaptationOf: Array; /** This manifestation is an analysis of these manifestations */ - isAnalysisOf: Array + isAnalysisOf: Array; /** This is a description from the original publisher of these manifestations */ - isDescriptionFromPublisherOf: Array + isDescriptionFromPublisherOf: Array; /** This movie is based on this manuscript */ - isManuscriptOf: Array + isManuscriptOf: Array; /** This music track is part of these albums */ - isPartOfAlbum: Array + isPartOfAlbum: Array; /** This article or book part can be found in these manifestations */ - isPartOfManifestation: Array + isPartOfManifestation: Array; /** This 'materialevurdering' can also be used to review these relevant manifestations, even though it was originally made for another publication */ - isReusedReviewOf: Array + isReusedReviewOf: Array; /** This manifestation is a review of these manifestations */ - isReviewOf: Array + isReviewOf: Array; /** This sound track for a game is related to these games */ - isSoundtrackOfGame: Array + isSoundtrackOfGame: Array; /** This sound track for a movie is related to these movies */ - isSoundtrackOfMovie: Array -} + isSoundtrackOfMovie: Array; +}; export type ReviewElement = { - __typename?: 'ReviewElement' - content?: Maybe + __typename?: 'ReviewElement'; + content?: Maybe; /** * This is a paragraph containing markup where links to manifestations * can be inserted. For instance '"Axel Steens nye job minder om [870970-basis:20307021] fra ...'. * Relevant manifestations are located in the manifestations field. */ - contentSubstitute?: Maybe - heading?: Maybe + contentSubstitute?: Maybe; + heading?: Maybe; /** Manifestations that can be used to generate and insert links into 'contentSubsitute'. */ - manifestations?: Maybe>> - type?: Maybe -} + manifestations?: Maybe>>; + type?: Maybe; +}; export enum ReviewElementType { Abstract = 'ABSTRACT', @@ -1400,18 +1397,18 @@ export enum ReviewElementType { } export type Role = { - __typename?: 'Role' + __typename?: 'Role'; /** The type of creator/contributor as text in singular and plural in Danish, e.g. forfatter/forfattere, komponist/komponister etc */ - function: Translation + function: Translation; /** The code for the type of creator or contributor, e.g. 'aut' for author, 'ill' for illustrator etc */ - functionCode: Scalars['String']['output'] -} + functionCode: Scalars['String']['output']; +}; export type SchoolUse = { - __typename?: 'SchoolUse' - code: SchoolUseCode - display: Scalars['String']['output'] -} + __typename?: 'SchoolUse'; + code: SchoolUseCode; + display: Scalars['String']['output']; +}; export enum SchoolUseCode { ForSchoolUse = 'FOR_SCHOOL_USE', @@ -1420,32 +1417,32 @@ export enum SchoolUseCode { /** Search Filters */ export type SearchFilters = { - accessTypes?: InputMaybe> - age?: InputMaybe> - ageRange?: InputMaybe> - branchId?: InputMaybe> - canAlwaysBeLoaned?: InputMaybe> - childrenOrAdults?: InputMaybe> - creators?: InputMaybe> - department?: InputMaybe> - dk5?: InputMaybe> - fictionNonfiction?: InputMaybe> - fictionalCharacters?: InputMaybe> - generalAudience?: InputMaybe> - genreAndForm?: InputMaybe> - letRange?: InputMaybe> - libraryRecommendation?: InputMaybe> - lixRange?: InputMaybe> - location?: InputMaybe> - mainLanguages?: InputMaybe> - materialTypesGeneral?: InputMaybe> - materialTypesSpecific?: InputMaybe> - status?: InputMaybe> - subjects?: InputMaybe> - sublocation?: InputMaybe> - workTypes?: InputMaybe> - year?: InputMaybe> -} + accessTypes?: InputMaybe>; + age?: InputMaybe>; + ageRange?: InputMaybe>; + branchId?: InputMaybe>; + canAlwaysBeLoaned?: InputMaybe>; + childrenOrAdults?: InputMaybe>; + creators?: InputMaybe>; + department?: InputMaybe>; + dk5?: InputMaybe>; + fictionNonfiction?: InputMaybe>; + fictionalCharacters?: InputMaybe>; + generalAudience?: InputMaybe>; + genreAndForm?: InputMaybe>; + letRange?: InputMaybe>; + libraryRecommendation?: InputMaybe>; + lixRange?: InputMaybe>; + location?: InputMaybe>; + mainLanguages?: InputMaybe>; + materialTypesGeneral?: InputMaybe>; + materialTypesSpecific?: InputMaybe>; + status?: InputMaybe>; + subjects?: InputMaybe>; + sublocation?: InputMaybe>; + workTypes?: InputMaybe>; + year?: InputMaybe>; +}; /** The supported fields to query */ export type SearchQuery = { @@ -1453,122 +1450,127 @@ export type SearchQuery = { * Search for title, creator, subject or a combination. * This is typically used where a single search box is desired. */ - all?: InputMaybe + all?: InputMaybe; /** Search for creator */ - creator?: InputMaybe + creator?: InputMaybe; /** Search for specific subject */ - subject?: InputMaybe + subject?: InputMaybe; /** Search for specific title */ - title?: InputMaybe -} + title?: InputMaybe; +}; /** The simple search response */ export type SearchResponse = { - __typename?: 'SearchResponse' + __typename?: 'SearchResponse'; /** A list of alternative search queries */ - didYouMean: Array + didYouMean: Array; /** * Make sure only to fetch this when needed * This may take seconds to complete */ - facets: Array + facets: Array; /** Total number of works found. May be used for pagination. */ - hitcount: Scalars['Int']['output'] + hitcount: Scalars['Int']['output']; /** Will return the facets that best match the input query and filters */ - intelligentFacets: Array + intelligentFacets: Array; /** The works matching the given search query. Use offset and limit for pagination. */ - works: Array -} + works: Array; +}; + /** The simple search response */ export type SearchResponseDidYouMeanArgs = { - limit?: InputMaybe -} + limit?: InputMaybe; +}; + /** The simple search response */ export type SearchResponseFacetsArgs = { - facets: Array -} + facets: Array; +}; + /** The simple search response */ export type SearchResponseIntelligentFacetsArgs = { - limit?: InputMaybe -} + limit?: InputMaybe; +}; + /** The simple search response */ export type SearchResponseWorksArgs = { - limit: Scalars['PaginationLimit']['input'] - offset: Scalars['Int']['input'] -} + limit: Scalars['PaginationLimit']['input']; + offset: Scalars['Int']['input']; +}; export type SerieWork = { - __typename?: 'SerieWork' + __typename?: 'SerieWork'; /** The number of work in the series as a number (as text) */ - numberInSeries?: Maybe + numberInSeries?: Maybe; /** Information about whether this work in the series should be read first */ - readThisFirst?: Maybe + readThisFirst?: Maybe; /** Information about whether this work in the series can be read without considering the order of the series, it can be read at any time */ - readThisWhenever?: Maybe + readThisWhenever?: Maybe; /** Work of a serieWork */ - work: Work -} + work: Work; +}; export type Series = { - __typename?: 'Series' + __typename?: 'Series'; /** A alternative title to the main 'title' of the series */ - alternativeTitles: Array + alternativeTitles: Array; /** Description of the series */ - description?: Maybe + description?: Maybe; /** Additional information */ - identifyingAddition?: Maybe + identifyingAddition?: Maybe; /** Whether this is a popular series or general series */ - isPopular?: Maybe + isPopular?: Maybe; /** MainLanguages of the series */ - mainLanguages: Array + mainLanguages: Array; /** Members of this serie. */ - members: Array + members: Array; /** * The number in the series as text qoutation and a number * @deprecated field 'NumberInSeries.number' is removed and only String value of 'NumberInSeries.display' is returned */ - numberInSeries?: Maybe + numberInSeries?: Maybe; /** A parallel title to the main 'title' of the series, in a different language */ - parallelTitles: Array + parallelTitles: Array; /** Information about whether this work in the series should be read first */ - readThisFirst?: Maybe + readThisFirst?: Maybe; /** Information about whether this work in the series can be read without considering the order of the series, it can be read at any time */ - readThisWhenever?: Maybe + readThisWhenever?: Maybe; /** The title of the series */ - title: Scalars['String']['output'] + title: Scalars['String']['output']; /** WorkTypes for the series */ - workTypes: Array -} + workTypes: Array; +}; + export type SeriesMembersArgs = { - limit?: InputMaybe - offset?: InputMaybe -} + limit?: InputMaybe; + offset?: InputMaybe; +}; export type Setting = Subject & { - __typename?: 'Setting' - display: Scalars['String']['output'] - language?: Maybe - local?: Maybe - type: SubjectType -} + __typename?: 'Setting'; + display: Scalars['String']['output']; + language?: Maybe; + local?: Maybe; + type: SubjectType; +}; export type Shelfmark = { - __typename?: 'Shelfmark' + __typename?: 'Shelfmark'; /** A postfix to the shelfmark, eg. 99.4 Christensen, Inger. f. 1935 */ - postfix?: Maybe + postfix?: Maybe; /** The actual shelfmark - e.g. information about on which shelf in the library this manifestation can be found, e.g. 99.4 */ - shelfmark: Scalars['String']['output'] -} + shelfmark: Scalars['String']['output']; +}; export type Sort = { - index: Scalars['String']['input'] - order: SortOrder -} + index: Scalars['String']['input']; + order: SortOrder; +}; export enum SortOrder { Asc = 'ASC', @@ -1580,37 +1582,37 @@ export enum SortOrder { } export type SpecificMaterialType = { - __typename?: 'SpecificMaterialType' + __typename?: 'SpecificMaterialType'; /** code for materialType */ - code: Scalars['String']['output'] + code: Scalars['String']['output']; /** Ths string to display */ - display: Scalars['String']['output'] -} + display: Scalars['String']['output']; +}; export type Subject = { - display: Scalars['String']['output'] + display: Scalars['String']['output']; /** Language of the subject - contains display and isoCode */ - language?: Maybe - local?: Maybe + language?: Maybe; + local?: Maybe; /** The type of subject - 'location', 'time period' etc., 'topic' if not specific kind of subject term */ - type: SubjectType -} + type: SubjectType; +}; export type SubjectContainer = { - __typename?: 'SubjectContainer' + __typename?: 'SubjectContainer'; /** All subjects */ - all: Array + all: Array; /** Only DBC verified subjects */ - dbcVerified: Array -} + dbcVerified: Array; +}; export type SubjectText = Subject & { - __typename?: 'SubjectText' - display: Scalars['String']['output'] - language?: Maybe - local?: Maybe - type: SubjectType -} + __typename?: 'SubjectText'; + display: Scalars['String']['output']; + language?: Maybe; + local?: Maybe; + type: SubjectType; +}; export enum SubjectType { Corporation = 'CORPORATION', @@ -1642,29 +1644,29 @@ export enum SubjectType { } export type SubjectWithRating = Subject & { - __typename?: 'SubjectWithRating' - display: Scalars['String']['output'] - language?: Maybe - local?: Maybe + __typename?: 'SubjectWithRating'; + display: Scalars['String']['output']; + language?: Maybe; + local?: Maybe; /** Expressed as integer on a scale from 1 to 5 */ - rating?: Maybe - type: SubjectType -} + rating?: Maybe; + type: SubjectType; +}; export type SuggestResponse = { - __typename?: 'SuggestResponse' - result: Array -} + __typename?: 'SuggestResponse'; + result: Array; +}; export type Suggestion = { - __typename?: 'Suggestion' + __typename?: 'Suggestion'; /** The suggested term which can be searched for */ - term: Scalars['String']['output'] + term: Scalars['String']['output']; /** The type of suggestion: creator, subject or title */ - type: SuggestionType + type: SuggestionType; /** A work related to the term */ - work?: Maybe -} + work?: Maybe; +}; export enum SuggestionType { Composit = 'COMPOSIT', @@ -1674,183 +1676,186 @@ export enum SuggestionType { } export type TableOfContent = { - __typename?: 'TableOfContent' - content?: Maybe - heading?: Maybe - listOfContent?: Maybe> -} + __typename?: 'TableOfContent'; + content?: Maybe; + heading?: Maybe; + listOfContent?: Maybe>; +}; export type TimePeriod = Subject & { - __typename?: 'TimePeriod' - display: Scalars['String']['output'] - language?: Maybe - local?: Maybe - period: Range - type: SubjectType -} + __typename?: 'TimePeriod'; + display: Scalars['String']['output']; + language?: Maybe; + local?: Maybe; + period: Range; + type: SubjectType; +}; export type Translation = { - __typename?: 'Translation' + __typename?: 'Translation'; /** Translation in plural form, e.g. forfattere, komponister, instruktører etc. */ - plural: Scalars['String']['output'] + plural: Scalars['String']['output']; /** Translation in singular form, e.g. forfatter, komponist, instruktør */ - singular: Scalars['String']['output'] -} + singular: Scalars['String']['output']; +}; export type TvSeries = { - __typename?: 'TvSeries' + __typename?: 'TvSeries'; /** Dansih translated title of the tv serie */ - danishLaunchTitle?: Maybe + danishLaunchTitle?: Maybe; /** Detailed information about the disc */ - disc?: Maybe + disc?: Maybe; /** Detailed information about the episode */ - episode?: Maybe + episode?: Maybe; /** Episode titles */ - episodeTitles?: Maybe> + episodeTitles?: Maybe>; /** Detailed information about the season */ - season?: Maybe + season?: Maybe; /** Title of the tv serie */ - title?: Maybe + title?: Maybe; /** Detailed information about the volume */ - volume?: Maybe -} + volume?: Maybe; +}; export type TvSeriesDetails = { - __typename?: 'TvSeriesDetails' - display?: Maybe - numbers?: Maybe> -} + __typename?: 'TvSeriesDetails'; + display?: Maybe; + numbers?: Maybe>; +}; export type Unit = { - __typename?: 'Unit' - id: Scalars['String']['output'] - manifestations: Array -} + __typename?: 'Unit'; + id: Scalars['String']['output']; + manifestations: Array; +}; export type UnitDescription = { - __typename?: 'UnitDescription' - additionalDescription?: Maybe - extent?: Maybe - numberAndType?: Maybe - size?: Maybe - summary: Scalars['String']['output'] - technicalInformation?: Maybe -} + __typename?: 'UnitDescription'; + additionalDescription?: Maybe; + extent?: Maybe; + numberAndType?: Maybe; + size?: Maybe; + summary: Scalars['String']['output']; + technicalInformation?: Maybe; +}; export type Universe = { - __typename?: 'Universe' + __typename?: 'Universe'; /** A alternative title to the main 'title' of the universe */ - alternativeTitles?: Maybe> + alternativeTitles?: Maybe>; /** both series and works in a list */ - content: UniverseContentResult + content: UniverseContentResult; /** Description of the universe */ - description?: Maybe + description?: Maybe; /** A key that identifies a universe. */ - key: Scalars['String']['output'] + key: Scalars['String']['output']; /** All series within the universe */ - series: Array + series: Array; /** Literary/movie universe this work is part of e.g. Wizarding World, Marvel Cinematic Universe */ - title: Scalars['String']['output'] + title: Scalars['String']['output']; /** work types that are in this universe */ - workTypes: Array + workTypes: Array; /** All works within the universe but not in any series */ - works: Array -} + works: Array; +}; + export type UniverseContentArgs = { - limit?: InputMaybe - offset?: InputMaybe - workType?: InputMaybe -} + limit?: InputMaybe; + offset?: InputMaybe; + workType?: InputMaybe; +}; + export type UniverseSeriesArgs = { - limit?: InputMaybe - offset?: InputMaybe - workType?: InputMaybe -} + limit?: InputMaybe; + offset?: InputMaybe; + workType?: InputMaybe; +}; + export type UniverseWorksArgs = { - limit?: InputMaybe - offset?: InputMaybe - workType?: InputMaybe -} + limit?: InputMaybe; + offset?: InputMaybe; + workType?: InputMaybe; +}; -export type UniverseContent = Series | Work +export type UniverseContent = Series | Work; export type UniverseContentResult = { - __typename?: 'UniverseContentResult' - entries: Array - hitcount: Scalars['Int']['output'] -} + __typename?: 'UniverseContentResult'; + entries: Array; + hitcount: Scalars['Int']['output']; +}; export type Work = { - __typename?: 'Work' + __typename?: 'Work'; /** Abstract of the entity */ - abstract?: Maybe> + abstract?: Maybe>; /** Creators */ - creators: Array + creators: Array; /** DK5 main entry for this work */ - dk5MainEntry?: Maybe + dk5MainEntry?: Maybe; /** Overall literary category/genre of this work. e.g. fiction or nonfiction. In Danish skønlitteratur/faglitteratur for literature, fiktion/nonfiktion for other types. */ - fictionNonfiction?: Maybe + fictionNonfiction?: Maybe; /** The genre, (literary) form, type etc. of this work */ - genreAndForm: Array + genreAndForm: Array; /** Date of latest publication */ - latestPublicationDate?: Maybe + latestPublicationDate?: Maybe; /** The main language(s) of the work's content */ - mainLanguages: Array + mainLanguages: Array; /** Details about the manifestations of this work */ - manifestations: Manifestations + manifestations: Manifestations; /** The type of material of the manifestation based on bibliotek.dk types */ - materialTypes: Array + materialTypes: Array; /** Relations to other manifestations */ - relations: Relations + relations: Relations; /** Series for this work */ - series: Array + series: Array; /** * Members of a series that this work is part of * @deprecated Use 'Work.series.members' instead */ - seriesMembers: Array + seriesMembers: Array; /** Subjects for this work */ - subjects: SubjectContainer - titles: WorkTitles + subjects: SubjectContainer; + titles: WorkTitles; /** * Literary/movie universe this work is part of, e.g. Wizarding World, Marvel Universe * @deprecated Use 'universes' instead */ - universe?: Maybe + universe?: Maybe; /** Literary/movie universes this work is part of, e.g. Wizarding World, Marvel Universe */ - universes: Array + universes: Array; /** Unique identification of the work based on work-presentation id e.g work-of:870970-basis:54029519 */ - workId: Scalars['String']['output'] + workId: Scalars['String']['output']; /** Worktypes for this work - 'none' replaced by 'other' */ - workTypes: Array + workTypes: Array; /** The year this work was originally published or produced */ - workYear?: Maybe -} + workYear?: Maybe; +}; export type WorkTitles = { - __typename?: 'WorkTitles' + __typename?: 'WorkTitles'; /** The full title(s) of the work including subtitles etc */ - full: Array + full: Array; /** The main title(s) of the work */ - main: Array + main: Array; /** The title of the work that this expression/manifestation is translated from or based on. The original title(s) of a film which has a different distribution title. */ - original?: Maybe> + original?: Maybe>; /** Titles (in other languages) parallel to the main 'title' of the work */ - parallel: Array + parallel: Array; /** The sorted title of the entity */ - sort: Scalars['String']['output'] + sort: Scalars['String']['output']; /** The standard title of the entity, used for music and movies */ - standard?: Maybe + standard?: Maybe; /** The title of the entity with the language of the entity in parenthesis after. This field is only generated for non-danish titles. */ - titlePlusLanguage?: Maybe + titlePlusLanguage?: Maybe; /** Danish translation of the main title */ - translated?: Maybe> + translated?: Maybe>; /** detailed title for tv series */ - tvSeries?: Maybe -} + tvSeries?: Maybe; +}; export enum WorkType { Analysis = 'ANALYSIS', @@ -1871,136 +1876,110 @@ export enum WorkType { /** The facets to ask for */ export type ComplexSearchFacets = { - facetLimit: Scalars['Int']['input'] - facets: Array -} + facetLimit: Scalars['Int']['input']; + facets: Array; +}; export type LocalSuggestResponse = { - __typename?: 'localSuggestResponse' - result: Array -} + __typename?: 'localSuggestResponse'; + result: Array; +}; export type MoodQueries = { - __typename?: 'moodQueries' - moodRecommendKids: MoodRecommendKidsResponse - moodSearch: MoodSearchResponse - moodSearchKids: MoodSearchKidsResponse - moodSuggest: MoodSuggestResponse - moodTagRecommend: Array> - moodWorkRecommend: Array> -} + __typename?: 'moodQueries'; + moodRecommendKids: MoodRecommendKidsResponse; + moodSearch: MoodSearchResponse; + moodSearchKids: MoodSearchKidsResponse; + moodSuggest: MoodSuggestResponse; + moodTagRecommend: Array>; + moodWorkRecommend: Array>; +}; + export type MoodQueriesMoodRecommendKidsArgs = { - dislikes?: InputMaybe> - filters?: InputMaybe - limit?: InputMaybe - offset?: InputMaybe - tags?: InputMaybe> - work?: InputMaybe -} + dislikes?: InputMaybe>; + filters?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + tags?: InputMaybe>; + work?: InputMaybe; +}; + export type MoodQueriesMoodSearchArgs = { - field?: InputMaybe - limit?: InputMaybe - offset?: InputMaybe - q: Scalars['String']['input'] -} + field?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + q: Scalars['String']['input']; +}; + export type MoodQueriesMoodSearchKidsArgs = { - field?: InputMaybe - limit?: InputMaybe - offset?: InputMaybe - q: Scalars['String']['input'] -} + field?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + q: Scalars['String']['input']; +}; + export type MoodQueriesMoodSuggestArgs = { - limit?: InputMaybe - q: Scalars['String']['input'] -} + limit?: InputMaybe; + q: Scalars['String']['input']; +}; + export type MoodQueriesMoodTagRecommendArgs = { - hasCover?: InputMaybe - limit?: InputMaybe - minus?: InputMaybe> - plus?: InputMaybe> - tags: Array -} + hasCover?: InputMaybe; + limit?: InputMaybe; + minus?: InputMaybe>; + plus?: InputMaybe>; + tags: Array; +}; + export type MoodQueriesMoodWorkRecommendArgs = { - dislikes?: InputMaybe> - hasCover?: InputMaybe - likes: Array - limit?: InputMaybe - maxAuthorRecommendations?: InputMaybe - offset?: InputMaybe - threshold?: InputMaybe -} + dislikes?: InputMaybe>; + hasCover?: InputMaybe; + likes: Array; + limit?: InputMaybe; + maxAuthorRecommendations?: InputMaybe; + offset?: InputMaybe; + threshold?: InputMaybe; +}; /** Response type for moodSuggest */ export type MoodSuggestResponse = { - __typename?: 'moodSuggestResponse' + __typename?: 'moodSuggestResponse'; /** Suggestion */ - term: Scalars['String']['output'] + term: Scalars['String']['output']; /** The type of suggestion title/creator/tag */ - type: MoodSuggest + type: MoodSuggest; /** A work associated with the suggestion */ - work?: Maybe -} + work?: Maybe; +}; -export type WorkTeaserFragment = { - __typename?: 'Work' - workId: string - titles: { - __typename?: 'WorkTitles' - full: Array - original?: Array | null - } - creators: Array< - | { __typename: 'Corporation'; display: string } - | { __typename: 'Person'; display: string } - > - workYear?: { __typename?: 'PublicationYear'; year?: number | null } | null - materialTypes: Array<{ - __typename?: 'MaterialType' - materialTypeGeneral: { __typename?: 'GeneralMaterialType'; display: string } - }> -} +export type WorkTeaserFragment = { __typename?: 'Work', workId: string, titles: { __typename?: 'WorkTitles', full: Array, original?: Array | null }, creators: Array<{ __typename: 'Corporation', display: string } | { __typename: 'Person', display: string }>, workYear?: { __typename?: 'PublicationYear', year?: number | null } | null, materialTypes: Array<{ __typename?: 'MaterialType', materialTypeGeneral: { __typename?: 'GeneralMaterialType', display: string } }> }; export type SearchWithPaginationQueryVariables = Exact<{ - q: SearchQuery - offset: Scalars['Int']['input'] - limit: Scalars['PaginationLimit']['input'] - filters?: InputMaybe -}> - -export type SearchWithPaginationQuery = { - __typename?: 'Query' - search: { - __typename?: 'SearchResponse' - hitcount: number - works: Array<{ - __typename?: 'Work' - workId: string - titles: { - __typename?: 'WorkTitles' - full: Array - original?: Array | null - } - creators: Array< - | { __typename: 'Corporation'; display: string } - | { __typename: 'Person'; display: string } - > - workYear?: { __typename?: 'PublicationYear'; year?: number | null } | null - materialTypes: Array<{ - __typename?: 'MaterialType' - materialTypeGeneral: { - __typename?: 'GeneralMaterialType' - display: string - } - }> - }> - } -} + q: SearchQuery; + offset: Scalars['Int']['input']; + limit: Scalars['PaginationLimit']['input']; + filters?: InputMaybe; +}>; + + +export type SearchWithPaginationQuery = { __typename?: 'Query', search: { __typename?: 'SearchResponse', hitcount: number, works: Array<{ __typename?: 'Work', workId: string, titles: { __typename?: 'WorkTitles', full: Array, original?: Array | null }, creators: Array<{ __typename: 'Corporation', display: string } | { __typename: 'Person', display: string }>, workYear?: { __typename?: 'PublicationYear', year?: number | null } | null, materialTypes: Array<{ __typename?: 'MaterialType', materialTypeGeneral: { __typename?: 'GeneralMaterialType', display: string } }> }> } }; + +export type SearchFacetsQueryVariables = Exact<{ + q: SearchQuery; + facets: Array | FacetField; + facetLimit: Scalars['Int']['input']; + filters?: InputMaybe; +}>; + + +export type SearchFacetsQuery = { __typename?: 'Query', search: { __typename?: 'SearchResponse', facets: Array<{ __typename?: 'FacetResult', name: string, values: Array<{ __typename?: 'FacetValue', key: string, term: string, score?: number | null }> }> } }; + export const WorkTeaserFragmentDoc = ` fragment WorkTeaser on Work { @@ -2022,7 +2001,7 @@ export const WorkTeaserFragmentDoc = ` } } } - ` + `; export const SearchWithPaginationDocument = ` query searchWithPagination($q: SearchQuery!, $offset: Int!, $limit: PaginationLimit!, $filters: SearchFilters) { search(q: $q, filters: $filters) { @@ -2032,74 +2011,97 @@ export const SearchWithPaginationDocument = ` } } } - ${WorkTeaserFragmentDoc}` + ${WorkTeaserFragmentDoc}`; export const useSearchWithPaginationQuery = < - TData = SearchWithPaginationQuery, - TError = unknown ->( - variables: SearchWithPaginationQueryVariables, - options?: Omit< - UseQueryOptions, - 'queryKey' - > & { - queryKey?: UseQueryOptions< - SearchWithPaginationQuery, - TError, - TData - >['queryKey'] - } -) => { - return useQuery({ + TData = SearchWithPaginationQuery, + TError = unknown + >( + variables: SearchWithPaginationQueryVariables, + options?: Omit, 'queryKey'> & { queryKey?: UseQueryOptions['queryKey'] } + ) => { + + return useQuery( + { queryKey: ['searchWithPagination', variables], - queryFn: fetchData< - SearchWithPaginationQuery, - SearchWithPaginationQueryVariables - >(SearchWithPaginationDocument, variables), + queryFn: fetchData(SearchWithPaginationDocument, variables), ...options - }) -} + } + )}; -useSearchWithPaginationQuery.getKey = ( - variables: SearchWithPaginationQueryVariables -) => ['searchWithPagination', variables] +useSearchWithPaginationQuery.getKey = (variables: SearchWithPaginationQueryVariables) => ['searchWithPagination', variables]; export const useSuspenseSearchWithPaginationQuery = < - TData = SearchWithPaginationQuery, - TError = unknown ->( - variables: SearchWithPaginationQueryVariables, - options?: Omit< - UseSuspenseQueryOptions, - 'queryKey' - > & { - queryKey?: UseSuspenseQueryOptions< - SearchWithPaginationQuery, - TError, - TData - >['queryKey'] - } -) => { - return useSuspenseQuery({ + TData = SearchWithPaginationQuery, + TError = unknown + >( + variables: SearchWithPaginationQueryVariables, + options?: Omit, 'queryKey'> & { queryKey?: UseSuspenseQueryOptions['queryKey'] } + ) => { + + return useSuspenseQuery( + { queryKey: ['searchWithPaginationSuspense', variables], - queryFn: fetchData< - SearchWithPaginationQuery, - SearchWithPaginationQueryVariables - >(SearchWithPaginationDocument, variables), + queryFn: fetchData(SearchWithPaginationDocument, variables), ...options - }) + } + )}; + +useSuspenseSearchWithPaginationQuery.getKey = (variables: SearchWithPaginationQueryVariables) => ['searchWithPaginationSuspense', variables]; + + +useSearchWithPaginationQuery.fetcher = (variables: SearchWithPaginationQueryVariables, options?: RequestInit['headers']) => fetchData(SearchWithPaginationDocument, variables, options); + +export const SearchFacetsDocument = ` + query searchFacets($q: SearchQuery!, $facets: [FacetField!]!, $facetLimit: Int!, $filters: SearchFilters) { + search(q: $q, filters: $filters) { + facets(facets: $facets) { + name + values(limit: $facetLimit) { + key + term + score + } + } + } } + `; + +export const useSearchFacetsQuery = < + TData = SearchFacetsQuery, + TError = unknown + >( + variables: SearchFacetsQueryVariables, + options?: Omit, 'queryKey'> & { queryKey?: UseQueryOptions['queryKey'] } + ) => { + + return useQuery( + { + queryKey: ['searchFacets', variables], + queryFn: fetchData(SearchFacetsDocument, variables), + ...options + } + )}; + +useSearchFacetsQuery.getKey = (variables: SearchFacetsQueryVariables) => ['searchFacets', variables]; + +export const useSuspenseSearchFacetsQuery = < + TData = SearchFacetsQuery, + TError = unknown + >( + variables: SearchFacetsQueryVariables, + options?: Omit, 'queryKey'> & { queryKey?: UseSuspenseQueryOptions['queryKey'] } + ) => { + + return useSuspenseQuery( + { + queryKey: ['searchFacetsSuspense', variables], + queryFn: fetchData(SearchFacetsDocument, variables), + ...options + } + )}; + +useSuspenseSearchFacetsQuery.getKey = (variables: SearchFacetsQueryVariables) => ['searchFacetsSuspense', variables]; + -useSuspenseSearchWithPaginationQuery.getKey = ( - variables: SearchWithPaginationQueryVariables -) => ['searchWithPaginationSuspense', variables] - -useSearchWithPaginationQuery.fetcher = ( - variables: SearchWithPaginationQueryVariables, - options?: RequestInit['headers'] -) => - fetchData( - SearchWithPaginationDocument, - variables, - options - ) +useSearchFacetsQuery.fetcher = (variables: SearchFacetsQueryVariables, options?: RequestInit['headers']) => fetchData(SearchFacetsDocument, variables, options); diff --git a/lib/graphql/queries/search.fbi.graphql b/lib/graphql/queries/search.fbi.graphql index d222a7c7..c890382f 100644 --- a/lib/graphql/queries/search.fbi.graphql +++ b/lib/graphql/queries/search.fbi.graphql @@ -16,12 +16,13 @@ query searchFacets( $q: SearchQuery! $facets: [FacetField!]! $facetLimit: Int! + $filters: SearchFilters ) { - search(q: $q) { - hitcount + search(q: $q, filters: $filters) { facets(facets: $facets) { name values(limit: $facetLimit) { + key term score }