dyne / reflow-os

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

`createOffer` ignores DateTime fields #14

Closed vcuculo closed 3 years ago

vcuculo commented 3 years ago

The following

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

results in

{
  "data": {
    "createOffer": {
      "intent": {
        "hasPointInTime": null,
        "id": "01FFPTZ4Q51CE7N77619DQGCYH",
        "name": "Donazione"
      }
    }
  }
}

and the same happens for hasBeginning and hasEnd.

(related to https://github.com/dyne/zenpub/issues/66)

-- Edited because of wrong example.

densizengin commented 3 years ago

Hi @vcuculo,

Currently the schema definition does not accept hasBeginning, hasEnd, and hasPointInTime fields (will push a fix for it in a minute), but does accept due. I also tried to reproduce, but it returned with the expected due. Did you try your mutation on ReflowOS?

Cheers, srfsh

vcuculo commented 3 years ago

Sorry @srfsh , my mistake. due is correctly accepted, but I was interested in the hasPointInTime or hasBeginning field. I updated the example, thank you!

densizengin commented 3 years ago

I pushed the changes and built another image; can you update yours and try again?

vcuculo commented 3 years ago

I can confirm that it works now, thank you!