Thank you postgraphql authors for the incredible work. It's not a bug but I couldn't find this anywhere. Is it possible to read SQL queries corresponding to my postgraphql request?
V3:
DEBUG="postgraphql:postgres" postgraphql -c postgres://...
V4:
DEBUG="*:sql" postgraphql -c postgres://...
Note V3 will likely generate a significant number more SQL queries than v4. Also its possible v4 currently has a missing module error when you try it; you may need to "npm install sql-formatter"
Thank you @benjie, yeah that's why I asked the question in the first place :D because I am new to GraphQL and I find it too good to be true :D. Now I put the DEBUG="postgraphql:postgres" and I saw many separate SQL queries (especially counts) that I usually annotate in the same query. Is it possible to for the user to configure it to decrease the SQL queries per request as much as possible (i.e. to do eager loading whenever possible), or is this completely hidden from the user?
As mentioned, PostGraphQL v4 does significantly fewer SQL queries (one per root query, independent of depth) - I rebuilt it from the ground up to be more efficient.
Forgot to mention: you can try out v4 with npm install postgraphql@next - but it is still in alpha so beware 馃槈
Thanks!