Skip to content

Release v17.22.5

Choose a tag to compare

@github-actions github-actions released this 02 Nov 06:37
3b9062b

Summary

The backend supports both WebSocket and HTTP streaming JSON for observable queries, but developers were forced to create duplicate query implementations—one observable version using subscribe() and one non-observable version using perform(). This PR adds a perform method to ObservableQueryFor that uses HTTP fetch instead of WebSocket, enabling a single query class to serve both use cases.

Added

  • Added perform(args?: TArguments): Promise<QueryResult<TDataType>> method to IObservableQueryFor interface for HTTP-based single result queries (#872)
  • Added perform method implementation to ObservableQueryFor class that uses HTTP GET with fetch API (#872)
  • Added HTTP headers callback support to ObservableQueryFor via _httpHeadersCallback field (#872)
  • Added comprehensive test suite with 15 tests covering perform method scenarios: valid/invalid arguments, enumerable queries, paging, and sorting (#872)
  • Added private helper methods (validateArguments, buildRoute, buildQueryArguments, addPagingAndSortingToRoute, deserializeResult) to consolidate duplicate logic between perform and subscribe methods (#872)