{"id":13623050,"url":"https://github.com/zth/rescript-relay","last_synced_at":"2026-01-30T12:02:56.634Z","repository":{"id":36972504,"uuid":"198579408","full_name":"zth/rescript-relay","owner":"zth","description":"Use Relay with ReScript.","archived":false,"fork":false,"pushed_at":"2025-12-16T07:47:10.000Z","size":55578,"stargazers_count":343,"open_issues_count":12,"forks_count":55,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-12-19T19:50:32.876Z","etag":null,"topics":["graphql","react","reason-react","reasonml","relay","relay-modern","rescript","rescript-react"],"latest_commit_sha":null,"homepage":"https://rescript-relay-documentation.vercel.app/docs/getting-started","language":"ReScript","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/zth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-07-24T07:12:07.000Z","updated_at":"2025-12-16T07:46:47.000Z","dependencies_parsed_at":"2023-02-19T11:45:59.968Z","dependency_job_id":"7fca5233-2e4a-40e9-8f11-a6b37195fc06","html_url":"https://github.com/zth/rescript-relay","commit_stats":{"total_commits":1003,"total_committers":40,"mean_commits":25.075,"dds":0.2462612163509471,"last_synced_commit":"a8a95deebf1b0d80130f62b791e19871cab41aa3"},"previous_names":["zth/reason-relay"],"tags_count":61,"template":false,"template_full_name":null,"purl":"pkg:github/zth/rescript-relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zth%2Frescript-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zth%2Frescript-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zth%2Frescript-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zth%2Frescript-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zth","download_url":"https://codeload.github.com/zth/rescript-relay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zth%2Frescript-relay/sbom","scorecard":{"id":1239241,"data":{"date":"2025-10-20","repo":{"name":"github.com/zth/rescript-relay","commit":"b6d90b6f3349f2c2bc82349f98e13f8110f9d62e"},"scorecard":{"version":"v5.3.1-0.20251020080748-9e702f4c9dc6","commit":"9e702f4c9dc6992745395f4c8ac89942d0cf87ea"},"score":3,"checks":[{"name":"Maintained","score":9,"reason":"11 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/bindings.yml:1","Warn: no topLevel permission defined: .github/workflows/build-release.yml:1","Warn: no topLevel permission defined: .github/workflows/cli.yml:1","Warn: no topLevel permission defined: .github/workflows/integration-tests.yml:1","Warn: no topLevel permission defined: .github/workflows/ppx.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bindings.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/bindings.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bindings.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/bindings.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/bindings.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-release.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-release.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:93: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:128: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-release.yml:131: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-release.yml:139: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:144: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:154: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:155: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-release.yml:161: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:178: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:184: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:190: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:196: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:202: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:207: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:212: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:217: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:222: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-release.yml:239: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-release.yml:252: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-release.yml:256: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-release.yml:262: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/build-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cli.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/cli.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cli.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/cli.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/integration-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/integration-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/integration-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/integration-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ppx.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/ppx.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ppx.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/ppx.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ppx.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/ppx.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ppx.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/ppx.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ppx.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/ppx.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ppx.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/zth/rescript-relay/ppx.yml/master?enable=pin","Info:   0 out of  30 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  13 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"35 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-4hjh-wcwx-xvwj","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-mf6x-hrgr-658f","Warn: Project is vulnerable to: GHSA-xrh7-m5pp-39r6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/9e702f4c9dc6992745395f4c8ac89942d0cf87ea/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-10-26T23:22:57.035Z","repository_id":36972504,"created_at":"2025-10-26T23:22:57.036Z","updated_at":"2025-10-26T23:22:57.036Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28912236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T11:55:24.701Z","status":"ssl_error","status_checked_at":"2026-01-30T11:54:13.194Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","reason-react","reasonml","relay","relay-modern","rescript","rescript-react"],"created_at":"2024-08-01T21:01:27.429Z","updated_at":"2026-01-30T12:02:56.629Z","avatar_url":"https://github.com/zth.png","language":"ReScript","readme":"# rescript-relay\n\nUse Relay with ReScript.\n\n[**Join our Discord**](https://discord.gg/wzj4EN8XDc)\n\n## Getting started\n\n\u003e Are you using version `\u003e= 0.13.0` and ReScript syntax with VSCode? Make sure you install our [dedicated VSCode extension](https://marketplace.visualstudio.com/items?itemName=GabrielNordeborn.vscode-rescript-relay). Note: It only works with ReScript syntax.\n\nCheck out the [documentation](https://rescript-relay-documentation.vercel.app).\n\nAlso, check out the [changelog](CHANGELOG.md) - things will continue to change between versions (including breaking changes, although we'll try and keep them to a minimum) as we iterate and reach a stable version.\n\n## What it looks like\n\nYour components define what data they need through `%relay()`.\n\n```rescript\n/* Avatar.res */\nmodule UserFragment = %relay(`\n  fragment Avatar_user on User {\n    firstName\n    lastName\n    avatarUrl\n  }\n`)\n\n@react.component\nlet make = (~user) =\u003e {\n  let userData = UserFragment.use(user)\n\n  \u003cimg\n    className=\"avatar\"\n    src=userData.avatarUrl\n    alt={\n      userData.firstName ++ \" \"\n      userData.lastName\n    }\n  /\u003e\n}\n\n```\n\nFragments can include other fragments. This allows you to break your UI into encapsulated components defining their own data demands.\n\nHooks to use your fragments are autogenerated for you. The hook needs a _fragment reference_ from the GraphQL object where it was spread. Any object with one or more fragments spread on it will have a `fragmentRefs` prop on it, `someObj.fragmentRefs`. Pass that to the fragment hook.\n\n`Avatar_user` is spread right on the fragment, so we pass `userData.fragmentRefs` to the `\u003cAvatar /\u003e` component since we know it'll contain the fragment ref for `Avatar_user` that `\u003cAvatar /\u003e` needs. The `\u003cAvatar /\u003e` component then uses that to get its data.\n\n```rescript\n/* UserProfile.res */\nmodule UserFragment = %relay(`\n  fragment UserProfile_user on User {\n    firstName\n    lastName\n    friendCount\n    ...Avatar_user\n  }\n`)\n\n@react.component\nlet make = (~user) =\u003e {\n  let userData = UserFragment.use(user)\n\n  \u003cdiv\u003e\n    \u003cAvatar user=userData.fragmentRefs /\u003e\n    \u003ch1\u003e {React.string(userData.firstName ++ (\" \" ++ userData.lastName))} \u003c/h1\u003e\n    \u003cdiv\u003e\n      \u003cp\u003e\n        {React.string(\n          userData.firstName ++ (\" has \" ++ (userData.friendCount-\u003eInt.toString ++ \" friends.\")),\n        )}\n      \u003c/p\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n}\n```\n\nFinally, you make a query using `%relay()` and include the fragments needed to render the entire tree of components.\n\n```rescript\n/* Dashboard.res */\nmodule Query = %relay(`\n  query DashboardQuery {\n    me {\n      ...UserProfile_user\n    }\n  }\n`)\n\n@react.component\nlet make = () =\u003e {\n  let queryData = Query.use(~variables=(), ())\n\n  \u003cdiv\u003e \u003cUserProfile user=queryData.me.fragmentRefs /\u003e \u003c/div\u003e\n}\n\n```\n\n## Note about versioning\n\nRescriptRelay has moved through a few major lines with different ReScript baselines. Use the compatibility guide below to pick the right versions:\n\n### Compatibility\n\n| RescriptRelay | Required ReScript |\n| ------------- | ----------------- |\n| 4.x and newer | v12.x (or newer)  |\n| 3.x and below | v11.x (or older)  |\n\nAdditional context on historical focus areas:\n\n- 1.x will receive critical bug fixes etc, but new features won't be added\n- 2.x focuses on compatibility with ReScript v11, and uncurried mode (uncurried mode can be optional). This is intended to make the transition to v11+ smooth\n- 3.x fully embraces uncurried mode (no curried mode available), and adds a bunch of new stuff + changes existing APIs to make them better and more ergonomic\n- 4.x focuses exclusively on ReScript v12+.\n\n## Examples\n\n- A general example showcasing most available features: https://github.com/zth/rescript-relay/tree/master/example\n","funding_links":[],"categories":["ReScript","Reason"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzth%2Frescript-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzth%2Frescript-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzth%2Frescript-relay/lists"}