@fougere/app

The host-independent half of a Fougere app: boot, call envelope, REST table, form contract.

Entries: @fougere/app · @fougere/app/client · @fougere/app/answer · @fougere/app/web · @fougere/app/express

What you import

name
configureFougereOverrides the data layer sources: would give.
extendFougereAdd to what is already stated, instead of replacing it.
useFougereAppThe booted app: boots on first call and keeps it; a refusal is not kept.
useFougereConfigWhat fougere.config.ts says, read once and without booting.
reloadFougereTurn the ring.
useFougereAuthGet the auth runtime resolved at boot. Throws when no process-local frond brought one.
authOf
tableOfThe table, per frond.
prefixOf
invokeOnCalls an operation server-side, in process or over the wire as the topology says.
sessionOnThe session of the request a server renders, asked of the auth frond as a page would ask it.
errorsByFieldIndex validator errors by field — local validator and remote validator share this shape.
formFieldsOfThe fields a create form is made of.
openingOfWhat a form opens on: initial, else the declared defaults.
payloadOfThe body of the form's values: an empty control is null where the field admits it, else absent.
tableColumnsOfThe columns a list is made of.
ChoicesThe rows a reference field offers — a handful, and a search to reach the others.
SESSION_CALL
sessionOfThe session, asked through the envelope a page calls everything else through.
stateForThe request state for these headers. Empty when no auth is declared, or nobody is signed in.
jsonBodyOfThe JSON body of a request, within maxBodyBytes; no body reads as undefined, another type is refused.
graphqlSurfaceOfThe surface a GraphQL path selects. Ex: /graphql/public → public.
createMemoryStorage

Types

TypeScript types only — they do not run. Import them with import type to type your own code: a variable, a parameter, an option object.

name
FougereServerConfig
SchemaView
FormRowThe row an entity class builds, which is what its form fills and what create answers.
FormValuesWhat the form holds — any field, none of them yet.
FormErrorsOne message per refused field.
FormFieldNameA field of that row, by name.
FormField
FormReferenceThe entity a reference points at, and which of its fields names one of its rows.
ChoiceOne row a reference may point at, as a form offers it.
OfferWhat one load offers, and whether the target holds more than it — which is when a search is worth showing.
TableColumn
SessionView
GraphQLDocumentThe GraphQL facade — declared like the others, mounted like the others. A document, its variables, and which operation of it to run.
Built with Fougere and Nuxt, hosted on GitHub Pages.