Cannot return null for non-nullable field

I am working with graphql to build a new api however my posts are getting sent to server and I can persists data however, the query are returning cannot return null for non-nullable field.
The same code works when I test in another data set which is not related.
I wish to seek for help with this and also may be I can learn something and someone else can also learn something.
The code can be found at this repo

Thank you.