dyne / zenpub

Reflow federated economic network
GNU Affero General Public License v3.0
13 stars 3 forks source link

Graphql first partial test: intent, agent, unit, spatial thing, action #49

Open fosterlynn opened 4 years ago

fosterlynn commented 4 years ago

works:

doesn't work:

Notes and questions:

  1. Will test the deletes after the lists work.
  2. Unsure about the Measures on Intent. Seems like maybe you want people to create the Measure first for properties like resourceQuantity, then include the ID on the createIntent? Or more likely just I don't understand how to use IMeasure on create and update, example appreciated.
  3. Suggested to work on soon to round out Agent: Organization.classifiedAs. Not sure how we want to handle this, uri to your taxonomy? Or something simpler for now? Also agent relationships and agent relationship roles as part of getting base agent working? (I need to add something to agent relationship roles in VF for base role types.) Seems likely that for Reflow we can just plug in a set of roles that will work for everyone, might make things simpler for all involved?
mayel commented 4 years ago

Thanks Lynn, that's helpful!

Could you please share what queries you used for the create mutations, so we can test the same ones?

Will share an example for measure later.

fosterlynn commented 4 years ago

Could you please share what queries you used for the create mutations, so we can test the same ones?

mutation{createIntent(intent:{name:"test-more stuff", note: "test note",
    due: "2020-08-18T8:00:00-5:00", image: "http://example.images.com/my-image.png"}){
  intent {
    id
    note
    due
    image
  }
}}
mutation{createIntent(intent:{name:"test-provider", note: "test note",
    provider: "01EDEWFW4NZY04VQJ9VVD6J6HN"}){
  intent {
    id
    provider {
      id
    }
  }
}}
mutation{createSpatialThing(spatialThing:{name:"Willy Street Coop", 
  note: "test note", 
  lat: 45.44, 
  long: 83.666, 
  alt: 423,
    mappableAddress: "1221 Williamson St., Madison, WI 53703"}){
  spatialThing {
    id
    note
    name
    lat
    long
    alt
    mappableAddress
  }
}}

[edit] Just tested spatialThing without lat, long, alt, and it does work that way, although it does not set the long/lat based on mappableAddress. Not sure what we need to happen there.