Skip to content

Pass QueryContext into QueryProcessor #320

@iancooper

Description

@iancooper

In Brighter we discovered that only allowing the context to be created in the when the processor is called, prevents us passing additional information that the processing pipeline needs, into the pipeline from outside. It was only possible to do that via handler or decorator. This particularly obstructed work on OTel.

In V10 we made it possible to pass the RequestContext in to the CommandProcessor in Brighter as an optional (nullable) parameter. If null, we create the RequestContext via the RequestContextFactory, if not null, we use the context that is passed in.

Similarly in Darker we need to make it possible to pass the QueryContext in to the IQueryProcessor in Darker as an optional (nullable) parameter to Execute and ExecuteAsync (for ExecuteAsync it should be the second parameter) . In QueryProcessor's implementation: if null, we create the context via the IQueryContextFactory, if not null, we use the QueryContext that is passed in.

This is a breaking change to the interface of IQueryProcessor, and so is a V5 feature

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions