{"id":13499249,"url":"https://github.com/relay-tools/relay-local-schema","last_synced_at":"2025-05-14T21:07:15.747Z","repository":{"id":1308731,"uuid":"42072677","full_name":"relay-tools/relay-local-schema","owner":"relay-tools","description":"Use Relay without a GraphQL server","archived":false,"fork":false,"pushed_at":"2025-04-30T19:24:42.000Z","size":1392,"stargazers_count":253,"open_issues_count":13,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T20:33:54.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/relay-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2015-09-07T20:15:41.000Z","updated_at":"2023-03-08T03:29:58.000Z","dependencies_parsed_at":"2023-07-06T05:57:33.782Z","dependency_job_id":"cb4ae08b-66bf-45c7-ae76-922e19698c73","html_url":"https://github.com/relay-tools/relay-local-schema","commit_stats":{"total_commits":341,"total_committers":12,"mean_commits":"28.416666666666668","dds":0.6392961876832844,"last_synced_commit":"a2ba4f813dd17ea5cc1a13ef5cca9315f5c37def"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relay-tools%2Frelay-local-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relay-tools%2Frelay-local-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relay-tools%2Frelay-local-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relay-tools%2Frelay-local-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/relay-tools","download_url":"https://codeload.github.com/relay-tools/relay-local-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227612,"owners_count":22035669,"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-07-31T22:00:31.423Z","updated_at":"2025-05-14T21:07:10.706Z","avatar_url":"https://github.com/relay-tools.png","language":"JavaScript","funding_links":[],"categories":["Libraries","Tooling","Uncategorized","JavaScript","Relay [🔝](#readme)"],"sub_categories":["JavaScript Libraries","Uncategorized"],"readme":"# Relay Local Schema [![Travis][build-badge]][build] [![npm][npm-badge]][npm]\n\nUse [Relay](https://relay.dev/) without a GraphQL server.\n\n[![Codecov][codecov-badge]][codecov]\n[![Discord][discord-badge]][discord]\n\n## Usage\n\n```js\nimport { Environment } from 'react-relay';\nimport { Network } from 'relay-local-schema';\n\nimport schema from './data/schema';\n\nconst environment = new Environment({\n  network: Network.create({ schema }),\n  /* ... */\n});\n```\n\nThis will execute queries against the specified schema locally, rather than against a separate GraphQL server.\n\nYou can also specify a GraphQL.js `rootValue` or `contextValue`:\n\n```js\nconst environment = new Environment({\n  network: Network.create({\n    schema,\n    rootValue: 'foo',\n    contextValue: 'bar',\n  }),\n  /* ... */\n});\n```\n\nFor more control over the network layer, you can use `createFetch` to create just the fetch function.\n\n```js\nimport { Environment, Network } from 'react-relay';\nimport { createFetch } from 'relay-local-schema';\n\nimport schema from './data/schema';\n\nconst environment = new Environment({\n  network: Network.create(createFetch({ schema })),\n  /* ... */\n});\n```\n\n## Caveat\n\nThis is intended for exploratory work, integration tests, demos, and working with local data. This is not generally intended as a substitute for a remote GraphQL back end in production.\n\n[build-badge]: https://img.shields.io/travis/relay-tools/relay-local-schema/master.svg\n[build]: https://travis-ci.org/relay-tools/relay-local-schema\n\n[npm-badge]: https://img.shields.io/npm/v/relay-local-schema.svg\n[npm]: https://www.npmjs.org/package/relay-local-schema\n\n[codecov-badge]: https://img.shields.io/codecov/c/github/relay-tools/relay-local-schema/master.svg\n[codecov]: https://codecov.io/gh/relay-tools/relay-local-schema\n\n[discord-badge]: https://img.shields.io/badge/Discord-join%20chat%20%E2%86%92-738bd7.svg\n[discord]: https://discord.gg/0ZcbPKXt5bX40xsQ\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelay-tools%2Frelay-local-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelay-tools%2Frelay-local-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelay-tools%2Frelay-local-schema/lists"}