Fetches forward relations (via multiget) for a specific resource given a list of requests.
Fetches forward relations (via multiget) for a specific resource given a list of requests. This implementation optimizes fetches by merging multigets into as few requests as possible.
Multiget requests can be merged if all other query parameters are the same.
In the event of an error, a NaptimeError is returned instead of a NaptimeResponse
list of NaptimeRequests containing the endpoint and arguments (including ids)
resource that the requests is made against
request context (includes things like header)
Map of request ids (indexes from the deferred request batching) to either a NaptimeError or NaptimeResponse
Fetches reverse relations for a specific resource given a list of requests
Fetches reverse relations for a specific resource given a list of requests
In the event of an error, a NaptimeError is returned instead of a NaptimeResponse
list of NaptimeRequests containing the endpoint and arguments (including ids)
resource that the requests is made against
request context (includes things like header)
Map of request ids (indexes from the deferred request batching) to either a NaptimeError or NaptimeResponse
Extracts a resource name from a list of NaptimeRequests.
Extracts a resource name from a list of NaptimeRequests.
This method assumes that all requests will be for the same resource, otherwise it will return None.
a list of NaptimeRequests
a ResourceName if all requests are for the same resource, otherwise None
Converts a list of forward requests into the most optimal list of requests to execute.
Converts a list of forward requests into the most optimal list of requests to execute. Multiget requests can be merged into a single request, but _only_ if all of the query parameters are the same for the requests.
A list of NaptimeRequests specifying the resource and arguments
a map of TopLevelRequests -> list of NaptimeRequests that it fulfills
Helper to parse the elements in a response into a map of JsValue -> DataMapWithParent
Helper to parse the elements in a response into a map of JsValue -> DataMapWithParent
Response from the network call, containing data returned
schema that defines the shape of the response, for later use
Map of JsValue ids to DataMapWithParents