View Source PhxJsonRpc.Router.Pipe behaviour (Phoenix JSON RPC v0.6.0)

Behaviour for handling requests via rpc.

Summary

Callbacks

Handles rpc requests via the given context(router).

Callbacks

Link to this callback

handle(request, context)

View Source
@callback handle(request :: [map()] | map(), context :: module()) ::
  [PhxJsonRpc.Response.t()] | PhxJsonRpc.Response.t()

Handles rpc requests via the given context(router).

Processes each request by the following pipeline:

- parse
- validate
- dispatch

If batch size exceeded, an exception will be rendered and requests for the current batch wont be processed.