normandy
normandy copied to clipboard
Present arguments and filter objects directly in GraphQL instead of as strings
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.
non-trivial work, but likely want if we start using graphQL anywhere. model arguments