Execute Relay queries against a local GraphQL schema instead of a remote server.
Relay Local Schema is a JavaScript library that provides a network layer for Relay, enabling GraphQL queries to be executed against a local schema instead of a remote server. It solves the problem of needing a GraphQL backend during development, testing, or when working with local data, allowing developers to leverage Relay's capabilities without server dependencies.
Frontend developers using Relay and GraphQL who need to test, prototype, or demo applications without a live GraphQL server, or who work with local data sources.
Developers choose Relay Local Schema because it simplifies development workflows by removing the need for a GraphQL server, reduces setup complexity for testing, and integrates seamlessly with Relay's existing patterns for local data scenarios.
Use Relay without a GraphQL server
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Executes GraphQL queries directly against a local schema, eliminating network requests as demonstrated in the README's basic usage example with Environment and Network.create.
Supports optional rootValue and contextValue parameters, allowing customization of GraphQL.js execution for tailored testing or demo scenarios.
Integrates directly into Relay's Network layer via the createFetch function, maintaining Relay's declarative data-fetching patterns without extra setup.
Specifically designed for exploratory work, integration tests, and demos, reducing the overhead of setting up a GraphQL server during development phases.
As stated in the caveat, it's explicitly not intended as a substitute for a remote GraphQL backend in production, limiting its utility to development and testing.
Does not support GraphQL subscriptions or live queries, making it unsuitable for applications requiring real-time data updates or server-pushed changes.
Requires developers to set up and maintain a local GraphQL schema, adding overhead compared to using Relay with a pre-existing or remote server.