Class BasePersonalizeGraphQLSitemapServiceAbstract

Service that fetches the list of site pages using Sitecore's GraphQL API. Used to handle a single site This list is used for SSG and Export functionality.

Mixes

SearchQueryService

Hierarchy

Constructors

Properties

_graphQLClient: GraphQLClient

instance

Accessors

Methods

  • Fetch sitemap which could be used for generation of static pages during next export. The locale parameter will be used in the item query, but since i18n is not supported, the output paths will not include a language property.

    Parameters

    • locale: string

      which application supports

    Returns Promise<StaticPath[]>

    an array of

    See

    StaticPath objects

  • Fetch a flat list of all pages that belong to the specificed site and have a version in the specified language(s).

    Parameters

    • languages: string[]

      Fetch pages that have versions in this language(s).

    • formatStaticPath: ((path, language, isStaticRender) => StaticPath)

      Function for transforming the raw search results into (@see StaticPath) types.

        • (path, language, isStaticRender): StaticPath
        • Parameters

          • path: string[]
          • language: string
          • isStaticRender: boolean

          Returns StaticPath

    Returns Promise<StaticPath[]>

    list of pages

    Throws

    if the list of languages is empty.

    Throws

    if the any of the languages is an empty string.

  • Parameters

    • siteName: string
    • languages: string[]
    • formatStaticPath: ((path, language, isStaticRender) => StaticPath)
        • (path, language, isStaticRender): StaticPath
        • Parameters

          • path: string[]
          • language: string
          • isStaticRender: boolean

          Returns StaticPath

    Returns Promise<StaticPath[]>

  • Parameters

    • sitePaths: RouteListQueryResult[]
    • formatStaticPath: ((path, language, isStaticRender) => StaticPath)
        • (path, language, isStaticRender): StaticPath
        • Parameters

          • path: string[]
          • language: string
          • isStaticRender: boolean

          Returns StaticPath

    • language: string

    Returns Promise<StaticPath[]>

Generated using TypeDoc