defradb icon indicating copy to clipboard operation
defradb copied to clipboard

Improve JSON type coercion

Open nasdf opened this issue 4 months ago • 0 comments

The JSON input type should be able to handle any valid GQL type and not just strings.

This is how mutations with JSON fields currently work:

mutation {
  create_Users(input: {custom: "{\"tree\": \"maple\", \"age\": 250}"}) {
    custom
  }
}

This is how they should work:

mutation {
  create_Users(input: {custom: {tree: "maple", age: 250}}) {
    custom
  }
}

nasdf avatar Oct 03 '24 16:10 nasdf