Skip to content

Release v20.56.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 18:48
e3bf8a5

Summary

Two additions in this release: opt-in support for the HTTP QUERY method (RFC 10008) for Arc queries, and a sanctioned server-side path for executing [Roles]/[Authorize] commands from non-HTTP (background) code. Both are additive — GET remains the default query transport, and HTTP request authorization is unchanged.

Added

  • Queries can now be invoked with the HTTP QUERY method (RFC 10008), sending arguments, paging and sorting as a JSON request body instead of the URL query string — useful for large or sensitive query arguments that don't belong in a URL.
  • [QueryHttpMethod] attribute on a read model or a static query method declares the client transport in C#; it flows through proxy generation so the generated proxy uses that method by default (a method-level attribute overrides a read-model-level one).
  • On the client, opt in per query with query.setHttpMethod(QueryHttpMethod.Query), globally with Globals.queryHttpMethod, or with QueryHttpMethod.Auto which prefers QUERY and falls back to GET (remembering the outcome per backend).
  • Globals.queryHttpMethodResolver for choosing the transport per request, with a built-in lengthBasedQueryHttpMethod policy that keeps short queries on GET and prefers QUERY only when the URL would exceed a threshold.
  • ArcOptions.GeneratedApis.EnableQueryHttpMethod (default true) to disable the QUERY endpoints and restrict queries to GET only.
  • ISystemExecution for executing [Roles]/[Authorize] commands from server-side or background code (reactors, hosted services, sagas, command-to-command) as a trusted system actor carrying named roles, via an explicit using systemExecution.AsSystem(...) scope.
  • [ExecuteCommandsAsSystem] attribute to run a reactor's returned commands under declared roles automatically — opt-in; reactors without it are unchanged.

Changed

  • Every generated query endpoint now also accepts the QUERY method alongside GET; the GET behavior is unchanged. The OpenAPI/Swagger document notes the QUERY option on each query operation.
  • [Roles]/[Authorize] commands can now be authorized from non-HTTP callers through the new server-side execution scope. HTTP requests are unaffected — the request principal stays authoritative and request data can never enter the scope.