{"id":27320086,"url":"https://github.com/entria/graphql-optimizing","last_synced_at":"2025-04-12T09:12:43.544Z","repository":{"id":71333414,"uuid":"84263852","full_name":"entria/graphql-optimizing","owner":"entria","description":"GraphQL Request Watterfalls Optimizations","archived":false,"fork":false,"pushed_at":"2017-03-14T12:19:47.000Z","size":309,"stargazers_count":27,"open_issues_count":1,"forks_count":1,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-12T09:11:55.916Z","etag":null,"topics":["graphql","optmize"],"latest_commit_sha":null,"homepage":"https://dev-blog.apollodata.com/optimizing-your-graphql-request-waterfalls-7c3f3360b051","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-08T01:23:29.000Z","updated_at":"2023-03-22T20:24:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6233c35-383b-4137-8146-1cbb98a15360","html_url":"https://github.com/entria/graphql-optimizing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2Fgraphql-optimizing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2Fgraphql-optimizing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2Fgraphql-optimizing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2Fgraphql-optimizing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entria","download_url":"https://codeload.github.com/entria/graphql-optimizing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543848,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","optmize"],"created_at":"2025-04-12T09:11:53.403Z","updated_at":"2025-04-12T09:12:43.537Z","avatar_url":"https://github.com/entria.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Optimizing Your GraphQL Request Waterfalls\n\nI'll try to implement the 4 versions of optimization introduced in this blog post:\nhttps://dev-blog.apollodata.com/optimizing-your-graphql-request-waterfalls-7c3f3360b051#.bi8w9s6yn by @AndrewIngram\n\n## Query to be optimized\n\n```graphql\nquery UserEventScreen {\n  user(id: \"1\") {\n  \tname\n    email\n    upcomingEvent(first:5) {\n      edges {\n        node {\n          name\n          date\n          startTime\n          endTime\n          viewerRsvp\n          tags {\n            name\n          }\n          venue {\n            name\n          }\n          attendingFriendsOfViewer(first:4) {\n            edges {\n              node {\n                name\n                email\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n## Version 1 - Simple but slow\n\n![simple](./assets/simple.png)\n\n## Version 2 - Batching up the nodes\n\n![batchingNodes](./assets/batchingNodes.png)\n\n## Version 3 - Batching up the edges\n\n![batchingEdges](./assets/batchingEdges.png)\n\n## Version 4 - Looking ahead\n\n![lookingAhead](./assets/lookingAhead.png)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentria%2Fgraphql-optimizing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentria%2Fgraphql-optimizing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentria%2Fgraphql-optimizing/lists"}