coprocessor
The coprocessor configuration enables external request hooks in Hive Router.
For docs and usage guidance, see Coprocessors.
Top-level options
url
- Type:
string - Required: Yes
Endpoint of the external coprocessor service.
Supported formats:
http://host[:port][/path]unix:///absolute/path/to/socket.sockunix:///absolute/path/to/socket.sock?path=/request/path
protocol
- Type:
string - Required: Yes
- Allowed values:
http1,h2c,http2
Transport protocol used to call the coprocessor endpoint.
http1= HTTP/1.1 over TCPh2c= HTTP/2 cleartext over TCPhttp2is currently unsupported at runtime and rejected
timeout
- Type:
string - Default:
1s
Timeout for a single coprocessor call.
Examples: 100ms, 1s, 2s.
stages
- Type:
object - Default:
{}
Stage-specific configuration.
Top-level keys:
routergraphql
Stage structure
All stages are optional. A stage runs only if its object is configured.
Stage options
Each stage supports two keys:
conditioninclude
condition
- Type:
boolean | expression - Default:
true
If set, the stage runs only when the condition evaluates to true.
Example:
include
- Type: stage-specific object
- Default: all include fields disabled
Selects which fields Hive Router sends to your coprocessor for that stage.
Important: include controls what is sent to the coprocessor. It does not define all mutation
permissions on returned data.
router stage options
router.request
router.response
graphql stage options
graphql.request
graphql.analysis
graphql.response
Selection formats
context selection
context supports three forms:
false- include no contexttrue- include full context- list of keys - include selected keys only
GraphQL body selection
For graphql.request.include.body and graphql.analysis.include.body:
false- include no body fieldstrue- include all body fields- list - include selected body fields
Allowed list values:
queryoperationNamevariablesextensions