Fork me on GitHub
#graphql
<
2023-09-07
>
Nikolas S.01:09:00

Thank you very much for your reply, that makes sense. And after reading your message, I looked at the documentation again and noticed that I probably did not properly read the Field Resolvers section, since it explains everything that I did not understand quite well. As for the indirection, that's a good point too. I was following the tutorial and then adjusting it to my existing database code, without much thinking. In the tutorial the resolver creates an anonymous function to pass it the database on which the SQL query is executed, but in my case the queries already have the db-connection information, so I do need the anonymous function. Thank you very much for taking the time to reply to me and apologies for not taking a better look at the documentation.