h-REA / hREA

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

added agent_type field to rust side and in create agent mutations #308

Closed weswalla closed 2 years ago

weswalla commented 2 years ago
pospi commented 2 years ago

does agent type need to be added to vf graphql definitions?

No, not yet. We can continue using the Person & Organization APIs for now; just implementing "type" transparently in the resolver code so that both APIs are backed by the same Holochain zome.

For completeness, the related discussion in vf-graphql has started here but there will be some coordination needed with Bonfire along the way, probably after we finish off these inverse query edge names and publish the next release (99% sure that will be tomorrow, sorry for the delay!)

pospi commented 2 years ago

use agent type for graphql error handling (e.g. query for person returning organization, etc)

I think this will be a matter of the zome logic switching on the value of that field, and possibly updating different indexes as a result. But that might only be the case once #268 is merged. If it doesn't come up, don't worry about it for now (:

pospi commented 2 years ago

I suppose Graphql would just be totally unaware of this field and not return it on the response, as it would never be requested within the response portion of the graphql request.

That's correct. So it will be an internal-use field- it will still come back in the response data within the resolvers probably, but once returned from those functions the GraphQL execution engine will prune it out.