normandy icon indicating copy to clipboard operation
normandy copied to clipboard

Present arguments and filter objects directly in GraphQL instead of as strings

Open mythmon opened this issue 6 years ago • 1 comments

Currently, we only expose recipe arguments and filter objects as a raw JSON string in graphql. For example, the query {recipe(id:755){latestRevision{argumentsJson filterObjectsJson}}} results in this response:

{
  "data": {
    "recipe": {
      "latestRevision": {
        "argumentsJson": "{\"slug\": \"rollout-webrender-release-67-1541488\", \"preferences\": [{\"preferenceName\": \"gfx.webrender.all.qualified\", \"value\": true}]}",
        "filterObjectJson": "[{\"channels\": [\"release\"], \"type\": \"channel\"}, {\"versions\": [67], \"type\": \"version\"}, {\"type\": \"bucketSample\", \"input\": [\"\\\"webrender\\\"\"], \"start\": 0, \"count\": 250, \"total\": 1000}]"
      }
    }
  }
}

It would be a lot more helpful to present arguments and filter objects directly as objects instead of strings.

mythmon avatar Apr 25 '19 16:04 mythmon

non-trivial work, but likely want if we start using graphQL anywhere. model arguments

shell1 avatar Aug 09 '19 16:08 shell1