by altrunox · 5y ago · 0 comments
You cannot ask for all the children of a main comment or a thread, something like "give me all the comments and sub comments of thread X" is impossible, I was quite shocked because I read nowhere about this limitation, I solved it adding an extra field to my response adding a "father" field, so I needed to organize and sort the data at the front-end, instead of using an already sorted JSON like would be possible with rest.
With all due respect, I find that most of GraphQL tests and examples return mostly simple data that is kinda easy anyways.
https://github.com/graphql/graphql-spec/issues/91
And if someone else is interested to take a look at my clone project (it's in Clojure), for the GraphQL issue you can search for "request recursively nested objects".
https://www.giovanialtelino.com/project/hacker-news-graphql/