Skip to main content
Version: 1.0.x

Get Standalone View Models

đźš§Documentation Under Construction

We are actively working to improve this documentation. The content you see here may be incomplete, subject to change, or may not fully reflect the current state of the feature. We appreciate your understanding as we continue to enhance our docs.

The View operation retrieves standalone view models that don't require a content ID, making it ideal for accessing computed data, global configurations, navigation structures, or aggregated information that isn't tied to a specific content item. Unlike content-backed view models which layer on top of Get, standalone view models are queried directly through the View operation with just the ViewModel class name.

Standalone view models are perfect for scenarios like site navigation menus (computed from multiple content items), user preferences (aggregated from various sources), dashboard statistics (calculated on-demand), or any presentation data that doesn't map one-to-one with a content item. Configure your ViewModel classes as standalone entries (via viewModelEntryClass for standalone), and the GCA automatically generates View queries that return your computed fields and transformed data. This is the quickest way to get started with view models—create a ViewModel class with your computed logic, configure it in the schema, and immediately query it through the View operation.