Skip to main content

Module vista

Module vista 

Source
Expand description

Vista bridge for the GraphQL backend.

Construct a Vista from a typed Table<GraphqlApi, E> via GraphqlApi::vista_factory().from_table(...). Metadata (columns, id field, title fields, references) is harvested up front; the typed table is then re-wrapped as Table<GraphqlApi, EmptyEntity> so the universal Vista surface sees the same level of detail as the REST bridge.

A YAML spec builds the same way through build_from_spec, and its references: traverse to other specs on the same endpoint.

The shell only reads: it counts, lists and fetches by id, and advertises ordering, search and paging where the root field takes them. Writes are not supported, because mutation names and argument shapes differ from one schema to the next.

Re-exports§

pub use factory::GraphqlApiVistaFactory;
pub use spec::GraphqlApiVistaSpec;
pub use spec::GraphqlBlock;
pub use spec::GraphqlColumnBlock;
pub use spec::GraphqlColumnExtras;
pub use spec::GraphqlTableExtras;

Modules§

factory
GraphqlApiVistaFactory — typed-table entry point, VistaFactory trait impl, and the YAML pipeline (build_from_spec, register_yaml, with_resolver) for the GraphQL adapter.
spec
YAML-facing types for the GraphQL Vista driver: a table-level graphql: block and a column-level one. A hand-kept spec drives GraphqlApiVistaFactory::build_from_spec in place of introspection. Every key is listed in the book’s “HTTP APIs” chapter.

Structs§

GraphqlApiTableShell
The TableShell behind a GraphQL-backed Vista: an erased Table<GraphqlApi, EmptyEntity> plus the metadata and capabilities the factory harvested. Built by GraphqlApiVistaFactory; callers drive it through the Vista it is wrapped in.