As you can see, for publishedAt it works fine to set the default value to null via the config.
It would be great if there is a way to set the default value of series to null, so that we don't have to do the following all the time:
aPost({
series: null
})
I have tried setting series to null to 'null' in the fieldGeneration config, but it didn't work. Also, I didn't find anything in the docs or in other issues about this unfortunately.
Maybe I miss something and it's already possible, but if not, do you think this could be added one way or the other? I am happy to do the implementation as well.
This seems like a bug indeed, thanks for reporting it.
Would you be down to create a PR to fix it? If you do, make sure to add unit test for this use case
Thanks !
Hey there, first of all, thanks for the great plugin, it's really a big help for us. 🙏
In our GraphQL Schema, we have nested relationships that are nullable. A simple example:
A
Post
can have aSeries
, but for us it is rather the exception than the rule that this is the case.The config for the plugin looks like this:
Right now, our generated output is something like this (simplified):
As you can see, for
publishedAt
it works fine to set the default value tonull
via the config. It would be great if there is a way to set the default value of series tonull
, so that we don't have to do the following all the time:I have tried setting series to null to
'null'
in thefieldGeneration
config, but it didn't work. Also, I didn't find anything in the docs or in other issues about this unfortunately.Maybe I miss something and it's already possible, but if not, do you think this could be added one way or the other? I am happy to do the implementation as well.