h-REA / hREA

A ValueFlows / REA economic network coordination system implemented on Holochain and with supplied Javascript GraphQL libraries
https://docs.hrea.io
Other
143 stars 15 forks source link

define graphql resolvers for remaining 'read all' endpoints #320

Closed Connoropolous closed 2 years ago

Connoropolous commented 2 years ago

For each of the following, two things should be added:

  1. the resolver
  2. test code in test that exercises the endpoint

Since economicResources and economicEvents are done, they can be used as an example to base off of

e.g. readAll and economicEvents in this snippet: https://github.com/h-REA/hREA/blob/81c2b0097d92cce4cd475e3e191a2d90fa30ee61/modules/vf-graphql-holochain/queries/economicEvent.ts#L20-L29

pospi commented 2 years ago

Note that there's no need to test the cursors or pagination metadata for other endpoints as we're doing in event_resource_list_api.js since all endpoints are generated from the same macro. It's enough to simply verify that the outputs are returned in a list in the correct reverse insertion order.