Skip to content

Read the exported records from disk instead of calling the API #811

Description

@jamiefolsom

On a large static build, the content loaders should read exported records from disk when they are present, so that the build makes no API requests.

An export is a folder of files in the same shape as the site's own /api responses. When one is present at a configured path, each Core Data loader reads its model's records and related lists from those files instead of calling the API. Otherwise it falls back to the API, with the cap on requests in flight from #810. The collections, the record service, the detail pages and the API routes do not change. Only the loaders' source of data does.

Done when a build of a site from a hand-made export completes with zero requests to the API. For a small site the export can be produced by hand from the live API until the export job exists, see performant-software/core-data-cloud#678.

Part of #710.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    static-mvpStatic build: in the MVP (one site published as plain files from develop)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions