{"id":15577772,"url":"https://github.com/nikolasburk/relay-modern-migration-example","last_synced_at":"2025-04-24T02:10:50.598Z","repository":{"id":82369731,"uuid":"56691335","full_name":"nikolasburk/relay-modern-migration-example","owner":"nikolasburk","description":":memo: Todo example app built with React \u0026 Relay","archived":false,"fork":false,"pushed_at":"2017-07-21T15:15:09.000Z","size":121,"stargazers_count":33,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-18T09:34:33.023Z","etag":null,"topics":["graphql","react","relay","todomvc"],"latest_commit_sha":null,"homepage":"","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/nikolasburk.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":"2016-04-20T13:55:44.000Z","updated_at":"2023-12-01T04:17:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"bbd16249-0b91-40fc-b2d8-7841aa3d682b","html_url":"https://github.com/nikolasburk/relay-modern-migration-example","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/nikolasburk%2Frelay-modern-migration-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolasburk%2Frelay-modern-migration-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolasburk%2Frelay-modern-migration-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolasburk%2Frelay-modern-migration-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikolasburk","download_url":"https://codeload.github.com/nikolasburk/relay-modern-migration-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250546086,"owners_count":21448260,"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","react","relay","todomvc"],"created_at":"2024-10-02T19:01:52.239Z","updated_at":"2025-04-24T02:10:50.592Z","avatar_url":"https://github.com/nikolasburk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Migrating to Relay Modern\n\nThis repository contains 2 branches: \n\n- **classic**: Relay Classic\n- **modern**: Relay Modern\n\nYou can read the full tutorial describing the migration [here](https://www.graph.cool/docs/tutorials/migrating-to-relay-modern-eijooto4se/).\n\n## Example ([Live demo](https://demo-react-relay-todo-example.netlify.com) \u0026 [GraphQL Playground](https://api.graph.cool/relay/v1/cj1nq71xyfabv0199bp3a7hhf))\n\n![](http://imgur.com/75LEao7.gif)\n\n## Quickstart\n\n### 1. Clone example repository\n\n```sh\ngit clone https://github.com/graphcool-examples/react-relay-todo-quickstart.git\ncd react-relay-todo-quickstart\n```\n\n### 2. Create GraphQL API with [`graphcool`](https://www.npmjs.com/package/graphcool)\n\n```sh\n# Install Graphcool CLI\nnpm install -g graphcool\n\n# Create a new project based on the Todo schema\ngraphcool init --schema http://graphqlbin.com/todo.graphql\n```\n\nThis creates a GraphQL API for the following schema:\n\n```graphql\ntype Todo {\n  text: String!\n  complete: Boolean!\n}\n```\n\n### 3. Connect the app with your GraphQL API\n\nCopy the `Relay API` endpoint to `./src/app.js` as the argument for the constructor of `Relay.DefaultNetworkLayer`, replacing `__RELAY_API_ENDPOINT__ `:\n\n```js\n// replace `__RELAY_API_ENDPOINT__ ` with the endpoint from the previous step\nRelay.injectNetworkLayer(\n  new Relay.DefaultNetworkLayer('__RELAY_API_ENDPOINT__')\n);\n```\n\nFurther, open `package.json` and paste the endpoint as the value for the `url` key, again replacing `__RELAY_API_ENDPOINT__ `:\n\n```js\n\"graphql\": {\n  \"request\": {\n    \"url\": \"__RELAY_API_ENDPOINT__\"\n  }\n},\n```\n\n### 4. Install dependencies \u0026 run locally\n\n```sh\nyarn install\nyarn start # open http://localhost:3000 in your browser\n```\n\n## Next steps\n\n* [Advanced GraphQL features](https://www.graph.cool/docs/tutorials/advanced-features-eath7duf7d/)\n* [Authentication \u0026 Permissions](https://www.graph.cool/docs/reference/authorization/overview-iegoo0heez/)\n* [Implementing business logic with serverless functions](https://www.graph.cool/docs/reference/functions/overview-boo6uteemo/)\n\n## Help \u0026 Community [![Slack Status](https://slack.graph.cool/badge.svg)](https://slack.graph.cool)\n\nSay hello in our [Slack](http://slack.graph.cool/) or visit the [Graphcool Forum](https://www.graph.cool/forum/) if you run into issues or have questions. We love talking to you!\n\n![](http://i.imgur.com/5RHR6Ku.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolasburk%2Frelay-modern-migration-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikolasburk%2Frelay-modern-migration-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolasburk%2Frelay-modern-migration-example/lists"}