You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically what the title states, but here's a bit more context and an example:
I have a response object that has some optional keys depending if data for the parent item exists. However, it seems that these fields can never be null as protoc-gen-twirpql is generating a graphQL schema file with these optional fields marked with a !.
Detailed context: I have an array of objects I'm pulling from one db table and then OUTER JOINING those objects to another table and it's very likely that some of the fields will be null. If they are null, I would like to not append keys to the parent object. See the example response body, I'm looking for.
In the desired response, you can see that screen 1 doesn't have corresponding coordinate data, so position is not there, while screen 2 does have coordinate data. But because the generated schema file is putting a ! on the position field, GraphQL is throwing a must not be null error.
The text was updated successfully, but these errors were encountered:
Basically what the title states, but here's a bit more context and an example:
I have a response object that has some optional keys depending if data for the parent item exists. However, it seems that these fields can never be
null
asprotoc-gen-twirpql
is generating a graphQL schema file with these optional fields marked with a!
.Detailed context: I have an array of objects I'm pulling from one db table and then OUTER JOINING those objects to another table and it's very likely that some of the fields will be
null
. If they arenull
, I would like to not append keys to the parent object. See the example response body, I'm looking for.In the desired response, you can see that screen 1 doesn't have corresponding coordinate data, so
position
is not there, while screen 2 does have coordinate data. But because the generated schema file is putting a!
on theposition
field, GraphQL is throwing amust not be null
error.The text was updated successfully, but these errors were encountered: