In JSON for schemas, we presently output whether something is an optional or not in the following format:
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Float",
"ofType": null
}
}
}
}
}
This is verbose as hell, so in the output of JSON from codegen:generate, we instead get the stringified TypeScript type:
The problem is that this is not super-helpful for working with Swift, where ! indicates a force-unwrap instead of non-null, no annotation represents non-null instead of nullable, and ? indicates nullable.
Can we please update the output of the AST in JSON to use the hideous nested JSON instead of the stringified type so that I can more easily parse this into something that will work with Swift? Thank you!
In JSON for schemas, we presently output whether something is an optional or not in the following format:
This is verbose as hell, so in the output of JSON from
codegen:generate, we instead get the stringified TypeScript type:The problem is that this is not super-helpful for working with Swift, where
!indicates a force-unwrap instead ofnon-null, no annotation representsnon-nullinstead ofnullable, and?indicatesnullable.Can we please update the output of the AST in JSON to use the hideous nested JSON instead of the stringified type so that I can more easily parse this into something that will work with Swift? Thank you!