dyne / reflow-os

Base scripts to run Reflow OS
7 stars 2 forks source link

createOffer requires `action_id` #7

Closed vcuculo closed 3 years ago

vcuculo commented 3 years ago

The following mutation

mutation {
 createOffer(intent: {
      action: "transfer",
      name: "Donazione",
      receiver:"01F3MHQ0KWJC7M19B1E8BXVY46",
      resourceConformsTo: "01FE4094Y6J99MEDWXBXQCAJF8",
      availableQuantity: {hasUnit: "01FFJEBJ4S4E4ZDWZNEWYFZYD7", hasNumericalValue: 10}
      due: "2021-09-20T14:10:20+01:00"
}) {
  intent {
    id
    name
  }
}
}

results in

{
   "data": {
     "createOffer": null
   },
   "errors": [
     {
       "code": "required",
       "field": "action_id",
       "locations": [
         {
           "column": 2,
           "line": 3
         }
       ],
       "message": "can't be blank",
       "path": [
         "createOffer"
       ],
       "status": 200
     }
   ]
 }

but action_id field is not defined AFAIK

adam-burns commented 3 years ago

Can you confirm the host/IP address of the backend GraphQL you are using to attempt this interaction?

vcuculo commented 3 years ago

It is deployed on localhost.

adam-burns commented 3 years ago

OK. Thanks. The reason I asked was just to confirm that you were interacting with this repo's Bonfire backend, and not the CommonsPub (ZenPub flavour) backend.

vcuculo commented 3 years ago

Yes, I can confirm that I'm currently testing locally the Bonfire backend.

densizengin commented 3 years ago

Hi @vcuculo,

I pushed a fix to the ValueFlows code. Can you try again and report me back?

Thanks, srfsh

mayel commented 3 years ago

Merged upstream, thanks all!

vcuculo commented 3 years ago

Hi @vcuculo,

I pushed a fix to the ValueFlows code. Can you try again and report me back?

Thanks, srfsh

Thank you all, I can confirm this is fixed.