Nathan Walker

04/07/2021, 2:09 PM
Hey folks, I'm running the following mutation in the API and getting back an error message saying it expected parameter_defaults to be JSON type, but found {my_param: "my_param_value"} instead-- ObjectValueNode object has no attribute 'value'. Formatting it like JSON doesn't fix the problem. From what I've read, JSON isn't a built-in scalar type, so I'm thinking I need to declare something or wrap the parameter_defaults in something, but I'm not sure exactly what. Can somebody point me in the right direction?
mutation {
    flow_group_id: "f67a1118-41e6-4e3b-9f14-9203e8f5ed55",
    interval_clocks: [
      {interval: 60 
       parameter_defaults: {my_param: "my_param_value"}
    timezone: "America/New_York"
  ) {success}


04/07/2021, 2:14 PM
Hey @Nathan Walker, I think it wants you to pass a string that can be parsed into JSON. This requires some escaping
🙌 1
parameter_defaults: "{\"my_param\": \"my_param_value\"}"
eek sorry I'll edit that

Nathan Walker

04/07/2021, 2:26 PM
Aaaaaamazing. I would never have thought of that. Thank you!