{"id":13725632,"url":"https://github.com/entria/ReactNavigationRelayModern","last_synced_at":"2025-05-07T20:33:13.608Z","repository":{"id":71333420,"uuid":"81013941","full_name":"entria/ReactNavigationRelayModern","owner":"entria","description":"React Navigation integration with Relay","archived":false,"fork":false,"pushed_at":"2018-10-30T21:39:57.000Z","size":847,"stargazers_count":173,"open_issues_count":5,"forks_count":23,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-08-04T01:27:54.453Z","etag":null,"topics":["react-native","react-navigation","relay","relay-classic","relay-modern"],"latest_commit_sha":null,"homepage":null,"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}},"created_at":"2017-02-05T18:48:59.000Z","updated_at":"2024-03-13T05:53:11.000Z","dependencies_parsed_at":"2024-01-27T11:44:24.915Z","dependency_job_id":"e7e585b5-3985-4285-b5be-18b0a6c871e4","html_url":"https://github.com/entria/ReactNavigationRelayModern","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%2FReactNavigationRelayModern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2FReactNavigationRelayModern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2FReactNavigationRelayModern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entria%2FReactNavigationRelayModern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entria","download_url":"https://codeload.github.com/entria/ReactNavigationRelayModern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224645464,"owners_count":17346164,"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":["react-native","react-navigation","relay","relay-classic","relay-modern"],"created_at":"2024-08-03T01:02:29.691Z","updated_at":"2024-11-14T15:31:41.478Z","avatar_url":"https://github.com/entria.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# React Native + React-Navigation + Relay Modern\n\nThis is a sample repository that shows how to integrate React Native with [ReactNavigation](https://github.com/react-community/react-navigation) and [Relay Modern](https://facebook.github.io/relay/).\n\nFor the Relay-Classic Version see this [branch](https://github.com/sibelius/ReactNavigationRelayModern/tree/relay-classic) \n\nIt is connecting to this boilerplate code [graphql-dataloader-boilerplate](https://github.com/entria/graphql-dataloader-boilerplate)\n\n![alt tag](./demo/demo.gif)\n\n## Description\n- `data/` contains schema(.json/.graphql) of your GraphQL server. It will be used by Relay to compile your *graphql* queries to code\n- `yarn relay` or `yarn relay:watch` are used to convert *graphql* literals into generated files. The second command watch changes when `data/` files are updated\n\n[`.babelrc`](.babelrc) for Relay Modern\n```json\n{\n  \"plugins\": [\n    [\"relay\", {\"schema\": \"data/schema.json\"}]\n  ],\n}\n```\n\n### Relay Environment\nThe file [src/createRelayEnvironment.js](src/createRelayEnvironment.js) creates a Relay Environment and a Network instance that configures Relay with a function to fetch queries from the remote server\n\n### ReactNavigation + Relay Modern\n1. You should use a Relay Container such as *[FragmentContainer](https://facebook.github.io/relay/docs/fragment-container.html)*, *[PaginationContainer](https://facebook.github.io/relay/docs/pagination-container.html)* or others in any component that will be `pushed` into a `StackNavigation`\n   - For instance, check [UserList#createPaginationContainer](./src/UserList.js#L111)\n\n- Pushing a route that uses Relay and depends on a parameter [UserList#navigate](./src/UserList.js#L88)\n\n- Define that your route will need a parameter from react-navigation like these [UserDetail#query](./src/UserDetail.js#L57)\n- You also need to define it inside `variables` [UserDetail#variables](./src/UserDetail.js#L63)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentria%2FReactNavigationRelayModern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentria%2FReactNavigationRelayModern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentria%2FReactNavigationRelayModern/lists"}