{"action":"created","issue":{"url":"https://api.github.com/repos/walmartlabs/lacinia/issues/48","repository_url":"https://api.github.com/repos/walmartlabs/lacinia","labels_url":"https://api.github.com/repos/walmartlabs/lacinia/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/walmartlabs/lacinia/issues/48/comments","events_url":"https://api.github.com/repos/walmartlabs/lacinia/issues/48/events","html_url":"https://github.com/walmartlabs/lacinia/issues/48","id":223677327,"node_id":"MDU6SXNzdWUyMjM2NzczMjc=","number":48,"title":"Document a solution for batched resolvers","user":{"login":"AndrewIngram","id":35227,"node_id":"MDQ6VXNlcjM1MjI3","avatar_url":"https://avatars1.githubusercontent.com/u/35227?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewIngram","html_url":"https://github.com/AndrewIngram","followers_url":"https://api.github.com/users/AndrewIngram/followers","following_url":"https://api.github.com/users/AndrewIngram/following{/other_user}","gists_url":"https://api.github.com/users/AndrewIngram/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewIngram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewIngram/subscriptions","organizations_url":"https://api.github.com/users/AndrewIngram/orgs","repos_url":"https://api.github.com/users/AndrewIngram/repos","events_url":"https://api.github.com/users/AndrewIngram/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewIngram/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2017-04-23T23:55:58Z","updated_at":"2018-11-28T08:14:10Z","closed_at":"2017-07-26T20:12:01Z","author_association":"NONE","body":"I'm not yet a Clojure user (just started learning), so I'm not familiar with all the patterns available, but is there any guidance on how to batch up data-fetching resolvers to avoid the common \"n+1\" problem?\r\n\r\nI look at every GraphQL server solution I come across to see whether it can solve this problem. Some servers (Sangria, Absinthe) provide native solutions, whilst others (graphql-js, graphql-ruby) have the problem be solved in user-land via well-known libraries.\r\n\r\nWhich would it end up being for Lacinia/Clojure?\r\n\r\nFor a basic overview on the kind of request optimizations that should be possible, I've written an article about it: https://dev-blog.apollodata.com/optimizing-your-graphql-request-waterfalls-7c3f3360b051"},"comment":{"url":"https://api.github.com/repos/walmartlabs/lacinia/issues/comments/442357617","html_url":"https://github.com/walmartlabs/lacinia/issues/48#issuecomment-442357617","issue_url":"https://api.github.com/repos/walmartlabs/lacinia/issues/48","id":442357617,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjM1NzYxNw==","user":{"login":"mmmdreg","id":510042,"node_id":"MDQ6VXNlcjUxMDA0Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/510042?v=4","gravatar_id":"","url":"https://api.github.com/users/mmmdreg","html_url":"https://github.com/mmmdreg","followers_url":"https://api.github.com/users/mmmdreg/followers","following_url":"https://api.github.com/users/mmmdreg/following{/other_user}","gists_url":"https://api.github.com/users/mmmdreg/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmdreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmdreg/subscriptions","organizations_url":"https://api.github.com/users/mmmdreg/orgs","repos_url":"https://api.github.com/users/mmmdreg/repos","events_url":"https://api.github.com/users/mmmdreg/events{/privacy}","received_events_url":"https://api.github.com/users/mmmdreg/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T08:14:10Z","updated_at":"2018-11-28T08:14:10Z","author_association":"NONE","body":"I think previewing children is useful for the problem where it is preferable to perform a single query with a join rather than multiple separate queries. \r\n\r\nDataloader in JS land is more concerned with batching n+1 queries, so loading a list of 10 items where the resolver is defined at the item (rather than collection) level will do a single db query instead of 10. \r\n\r\nThere are a few options in clojure land, which are someone inspired by Haxl in Haskell land:\r\nhttps://github.com/kachayev/muse\r\nhttps://github.com/funcool/urania\r\nhttps://github.com/xsc/claro\r\n\r\n"}}
{"actor":{"display_login":"mmmdreg"}}