Apply#

subgrounds.transform.apply.handle_transform(transform)#

This function bundles the transform request and response as a generator.

The follow is as follows: -> subgrounds.query.DataRequest is sent in -> It is transformed, and then sent out -> Then, in an infinite loop:

-> subgrounds.query.DataResponse is sent in -> It is transformed, then sent out

The infinite loop allows us to continously transform responses,
  • Needed by execute_iter

subgrounds.transform.apply.apply_transforms(request_transforms, document_transforms, req)#
Apply all RequestTransforms and DocumentTransforms to a DataRequest and a

corresponding DataResponse.

This function abstractly applies a series of transforms onto a request and response. The execution of the request is handled outside this function (ala. sans-io), which

allows this function to only work with the abstracted components.

Note: For simplification, all DocumentTransforms stored at the subgraph are

converted to specific RequestTransforms when applied.