Testing phaseThis environment is in pre-launch testing — all data will be reset at launch.
Skip to content

Causality Reference ​

Every modelling decision in Mockomat has consequences further down the line: in the mock API your consumers call, in the data it returns, and in what you export. This page documents those chains, so you can predict the effect of a change before it reaches your consumers.


Model to API ​

Model DecisionMock API Consequence
Table createdDefault operations named after the table, e.g. customers (list) and customer (detail) for Customer
Attribute nameThe field name in responses
Attribute typeNo effect on responses — send parameter values in the type the data holds (numbers without quotes)
Searchable flagThe field is searched by searchTerm in list operations
Sortable / Filterable flagNo effect on the mock API: sortField accepts any attribute bound to a data column, and filtering uses operation parameters
Required flagNo effect on the mock API; the OpenAPI export lists the attribute as required

Renaming an attribute changes the field name consumers receive. Default operations take their names from the table when they are created; rename operations in API Design. Treat names as stable contract identifiers once consumers have integrated.

See Tables & Attributes for the full attribute reference.

Screenshot ref-causality-01-model-to-apiScreenshot ref-causality-01-model-to-api
ref-causality-01-model-to-apiMissing

Attribute settings on a table and their effect on the mock API.


Model to Runtime ​

Model DecisionRuntime Consequence
Table bound to imported dataThe list operation returns rows of the data pool
Table not boundAn empty list and a NOT_READY error
Relation between tablesRelated records are included, one level deep, at most 50 per parent record
Relation cardinality (1:1 vs 1:n)Response shape: a single nested object vs an array of objects
Relation directionWhich table exposes the nested data in its queries
Relation with wrong linking columnsEmpty nested fields

See Relations for cardinality and direction, and Runtime for the query pipeline.

Screenshot ref-causality-02-model-to-runtimeScreenshot ref-causality-02-model-to-runtime
ref-causality-02-model-to-runtimeMissing

Relation drawn on the board and the nested data in the query result.


Mapping to Data ​

Mappings control where field values come from. The mapping type is invisible to API consumers — they receive the same response shape regardless of how the data was sourced.

MappingData Consequence
Data Source (SOURCE)The value of the imported row's column; stable and consistent with related rows
Constant (CONSTANT)A fixed value on every row, on rows of imported data and on rows composed from value pools alike
Computed (COMPUTED)Not part of the response — the runtime does not evaluate expressions; the attribute editor no longer offers Computed
No column boundNo value for the field

The runtime never invents values: as long as the pool data is unchanged, the same query returns the same data. That makes Data Source mappings suitable for integration tests with expected outputs.

See Data Sources for the full mapping workflow.

Screenshot ref-causality-03-mapping-to-dataScreenshot ref-causality-03-mapping-to-data
ref-causality-03-mapping-to-dataMissing

Mapping configuration with Data Source and Constant attributes and their runtime output.


Operations to Consumer ​

API Design defines how consumers query a table.

Operation SettingConsumer Consequence
Operation nameThe root field consumers query
Default page sizeApplied when the consumer sends no pageSize (at most 100)
Default sortApplied when the consumer sends no sortField
ParametersThe arguments consumers can filter by; an unknown or missing required argument answers BAD_USER_INPUT
Scope filtersConditions that always apply, combined with parameters by AND

Views shape the runtime preview in the app (which columns show, in which order). They do not change the mock API response, which always carries every mapped attribute.

See Views and API Design.

Screenshot ref-causality-04-view-to-consumerScreenshot ref-causality-04-view-to-consumer
ref-causality-04-view-to-consumerMissing

Operation settings and the resulting query behavior side by side.


Model to Export ​

Model DecisionExport Consequence
TableOne module per table in a code package; one schema in the OpenAPI export
Attribute name and typeProperty, column and field types
Required flagA required property in the OpenAPI export; not applied in code packages yet
Searchable / Sortable flagsSearch fields and sortable list columns of the generated list query
RelationPart of the OpenAPI export; not generated in code packages yet
Operations and parametersNot part of exports — code packages come with their own standard queries and mutations per table

See Export for the generation workflow and output structure.

Screenshot ref-causality-05-api-to-exportScreenshot ref-causality-05-api-to-export
ref-causality-05-api-to-exportMissing

Model elements and where they appear in the OpenAPI export and the code package.


Plan to Features ​

Your account plan determines the feature surface available to your team.

PlanKey Consequences
GuestTemporary project kept in the browser; endpoint opened by its share token; no team
StarterPersistent project; mock API in the app only (no API keys); only you as member; daily request quota
ProfessionalAPI keys for your own code; team roles; code export; monthly request quota
BusinessMore projects, members and maintainers; endpoint analytics
EnterpriseNo catalog limits on projects and requests; limits per contract

The plan boundary is enforced by the platform. Creating an API key on Starter, for example, fails with a plan restriction — the project's mock API stays closed to your own code rather than falling back to a public endpoint.

See Account and Plans for all limits.


Role to Access ​

Roles govern what each team member can do in the projects they can open.

RoleAccess Consequences
ReadonlySees projects, the model and the preview; reads board notes
ReporterAlso writes board notes and comments
EditorAlso builds the model, creates projects, manages API keys and runs code export
MaintainerAlso deletes projects and manages members, project access and workspaces

The owner of the account is a maintainer and manages billing. Role restrictions are enforced by the API, not only in the interface: an Editor who tries to delete a project through a direct API call receives an authorization error.

See Team & Roles for the full permission list.


Preview Hint Chains ​

TriggerRuntime EffectHint in the Preview
Table not bound to imported dataNo rowsNot mapped to imported data
View not bound to a list operationNo data loadsNo API binding
View without identifier fieldRows open no detail viewNo identifier field

See Preview & Hints.

Screenshot ref-causality-06-hint-chainsScreenshot ref-causality-06-hint-chains
ref-causality-06-hint-chainsMissing

Runtime preview showing a hint and the place to fix it.


Cross-Cutting Chains ​

From Table Creation to API Consumer ​

  1. Table created on the Modelling Board — default operations are created with it.
  2. Attributes configured in Tables & Attributes — names and types defined.
  3. Table and attributes mapped in Data Sources — the table reads rows of the data pool.
  4. Operations tuned in API Design — names, parameters and defaults.
  5. Consumer queries the endpoint — the Runtime returns the mapped data.

From Relation to Nested Query ​

  1. Relation drawn on the Modelling Board.
  2. Cardinality selected — an object (1:1) or an array (1:n) in the response.
  3. Direction set — which table exposes the nested data.
  4. Consumer selects the nested field — the runtime includes the related records, one level deep.

Changing the cardinality after consumers have integrated changes the response shape (object vs array) — a breaking change.

Screenshot ref-causality-07-cross-cuttingScreenshot ref-causality-07-cross-cutting
ref-causality-07-cross-cuttingMissing

End-to-end flow from table creation through mapping to the consumer query.


Summary ​

When evaluating a modelling change, trace the chain forward:

  • Will this rename break existing consumer queries? (Model to API)
  • Is the table still bound to imported data? (Model to Runtime)
  • Will this attribute still return a value? (Mapping to Data)
  • Do consumers rely on this operation, parameter or default? (Operations to Consumer)
  • Does the export carry what I expect? (Model to Export)

If the answer to any of these questions is uncertain, use the Modelling Runtime Preview to validate before committing the change.