GraphQL API
The queries the frontend relies on.
Payload exposes GraphQL at /api/graphql. The loader issues one query per locale:
query DocsByLocale($locale: LocaleInputType!, $limit: Int!) {
Docs(locale: $locale, limit: $limit, where: { _status: { equals: published } }) {
docs { slug title description markdown sidebarLabel updatedAt }
}
}The markdown field
The markdown field is virtual: nothing is stored. An afterRead hook converts the Lexical body on the fly, so the frontend never touches Lexical JSON.