#
Endpoint Execution Scopes
When writing Custom Endpoints, your code executes within a specific scope that determines what operations are allowed.
#
Endpoints Scope
This is the standard scope for endpoints running on a Primary node or when the system allows write access.
Class: CodeEndpointExecutionScope
#
Read-Only Endpoints Scope
This scope is used when an endpoint is executed on a Read-Only Replica. You cannot modify the graph directly in this scope. However, you can use RunEndpointOnPrimaryAsync to forward write operations to the primary node.
Class: ReadOnlyCodeEndpointExecutionScope
For more on Replicas, see Read-Only Replicas.