Skip to main content

Execute Static Methods

🚧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 Execute operation enables you to expose and call static Java methods directly through GraphQL, providing a powerful extension point for custom business logic that doesn't fit the standard CRUD model of content operations. By configuring static methods as executable entries (via executableEntryClass), you can create GraphQL queries and mutations that invoke your Java code, pass typed arguments, and return any serializable result.

Execute is ideal for scenarios requiring custom business logic like calculations, integrations with external systems, batch operations, search algorithms, or any functionality that goes beyond simple content retrieval and manipulation. The GCA automatically generates GraphQL operation signatures from your method signatures, handles argument mapping and validation, and supports rich return types including primitives, custom objects, and collections. This operation embodies the "API-First" philosophy by making your Java APIs directly accessible through GraphQL without duplicating logic in view models or custom endpoint implementations, reducing development effort and maintaining a single source of truth for your business logic.