{"id":16482077,"url":"https://github.com/bod/deferdemo","last_synced_at":"2026-05-14T04:34:33.338Z","repository":{"id":138161108,"uuid":"484364116","full_name":"BoD/DeferDemo","owner":"BoD","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-26T07:24:01.000Z","size":2676,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T10:38:59.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/BoD.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}},"created_at":"2022-04-22T08:56:35.000Z","updated_at":"2022-08-31T15:26:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"8cc010f7-92c6-4ce5-8205-45f34f4f4512","html_url":"https://github.com/BoD/DeferDemo","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/BoD%2FDeferDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2FDeferDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2FDeferDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BoD%2FDeferDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BoD","download_url":"https://codeload.github.com/BoD/DeferDemo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241198944,"owners_count":19926554,"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":[],"created_at":"2024-10-11T13:09:32.878Z","updated_at":"2026-05-14T04:34:33.291Z","avatar_url":"https://github.com/BoD.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apollo Kotlin `@defer` demo\n\nA simple Android demo app that shows how to use the `@defer` directive with Apollo Kotlin.\n\n## Setup\n\nThe server used by this app is the Apollo Router from the [Supergraph Demo for Federation 2](https://github.com/apollographql/supergraph-demo-fed2).\n\nTo setup the server:\n\n1. You'll need docker and docker-compose\n2. Start a supergraph:\n\n```\ngit clone git@github.com:apollographql/supergraph-demo-fed2.git\ncd supergraph-demo-fed2\nmake up-supergraph-no-otel-local\n```\n\nA GraphQL server will now be listening for connections at http://localhost:4000.\n\nFull setup instructions and more information available [here](https://github.com/apollographql/supergraph-demo-fed2#apollo-router-entity-based-defer).\n\nYou can now run the Android app on an emulator.\n\n## What the app demonstrates\n\nYou should see a screen showing:\n1. Basic product information (Id. SKU, Size)\n2. After a few seconds: more information about inventory (estimated delivery, fastest delivery)\n\n\u003cimg src=\"https://raw.githubusercontent.com/BoD/DeferDemo/master/screenrecord.gif\" width=\"320\" /\u003e\n\nThis is because the inventory fields are queried in a fragment with the `@defer` directive:\n\n```graphql\nquery ProductQuery {\n  product(id: \"converse-1\") {\n    ...ProductInfoBasic\n    ...ProductInfoInventory @defer # \u003c- here!\n  }\n}\n\n# Basic info (fast)\nfragment ProductInfoBasic on Product {\n  id\n  sku\n  dimensions {\n    size\n  }\n}\n\n# Inventory (slow)\nfragment ProductInfoInventory on Product {\n  delivery {\n    estimatedDelivery\n    fastestDelivery\n  }\n}\n```\n\nThis way, fast fields can be received as soon as available, while the slower fields are received asynchronously.\n\n## Alternative branch using GraphQL Helix\n\nIn the [`helix`](https://github.com/BoD/DeferDemo/tree/helix) branch, an alternative version of this demo is available, which uses an instance of the [GraphQL Helix](https://www.graphql-helix.com/) server instead of the Apollo Supergraph demo. It may be easier to setup.\n\nCheckout the `helix` branch and follow the instructions in the [`helix/README.md`](https://github.com/BoD/DeferDemo/blob/helix/helix/README.md) file to start the server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbod%2Fdeferdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbod%2Fdeferdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbod%2Fdeferdemo/lists"}