{"id":13499526,"url":"https://github.com/graphql-elixir/graphql_relay","last_synced_at":"2026-02-20T16:01:24.377Z","repository":{"id":57503317,"uuid":"52476172","full_name":"graphql-elixir/graphql_relay","owner":"graphql-elixir","description":"Relay helpers for GraphQL Elixir","archived":false,"fork":false,"pushed_at":"2018-07-11T15:55:07.000Z","size":148,"stargazers_count":37,"open_issues_count":4,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-21T14:49:52.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphql-elixir.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-24T21:37:09.000Z","updated_at":"2025-10-12T13:35:00.000Z","dependencies_parsed_at":"2022-09-13T08:22:00.601Z","dependency_job_id":null,"html_url":"https://github.com/graphql-elixir/graphql_relay","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/graphql-elixir/graphql_relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphql-elixir","download_url":"https://codeload.github.com/graphql-elixir/graphql_relay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_relay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29656589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-07-31T22:00:34.199Z","updated_at":"2026-02-20T16:01:24.351Z","avatar_url":"https://github.com/graphql-elixir.png","language":"Elixir","readme":"# GraphQL.Relay\n\nThis library contains helper functions that make it easier to setup a Relay compatible GraphQL schema.\n\nYou do not need this library to create a Relay compatible GraphQL schema, it just makes it easier. To illustrate this point here's what a Relay compatible schema looks like [when you don't use this library](https://github.com/graphql-elixir/graphql_relay/blob/master/test/support/star_wars/schema_without_library.exs) and [when you do use it](https://github.com/graphql-elixir/graphql_relay/blob/master/test/support/star_wars/schema.exs).\n\nThis library relies on the [GraphQL Elixir](https://github.com/graphql-elixir/graphql) library.\n\n## Installation\n\nAdd `graphql_relay` to your list of dependencies in `mix.exs`:\n\n    def deps do\n      [{:graphql_relay, \"~\u003e 0.5\"}]\n    end\n\n## Configuration\n\nRelay requires a `schema.json` file which is generated server-side, so we need a way of creating and updating this file.\n\nIn `config/config.exs` add the following config:\n\n```elixir\nconfig :graphql_relay,\n  schema_module: MyApp.Schema,\n  schema_json_path: \"#{Path.dirname(__DIR__)}/priv/graphql\"\n```\n\n* `MyApp.Schema` is a module with a `schema` function that returns your GraphQL schema\n* The `schema_json_path` is where the generated JSON schema lives\n\nGenerate your schema with:\n\n    mix run -e GraphQL.Relay.generate_schema_json!\n\n## Phoenix Integration\n\nIn Phoenix you can generate the schema automatically after each modification to a GraphQL related schema file in the dev environment:\n\n* [Phoenix Dev Setup](https://github.com/graphql-elixir/graphql_relay/wiki/Setup-Phoenix-app-to-reload-schema.json-file-whenever-GraphQL-schema-files-change)\n\n## Babel and Relay\n\nRelay's Babel Plugin ([Relay Docs](https://facebook.github.io/relay/docs/guides-babel-plugin.html), [npm](https://www.npmjs.com/package/babel-relay-plugin)) and `babel-relay-plugin-loader` ([npm](https://www.npmjs.com/package/babel-relay-plugin-loader), [GitHub](https://github.com/BerndWessels/babel-relay-plugin-loader)) rely on a `schema.json` file existing that contains the result of running the full GraphQL introspection query against your GraphQL endpoint. Babel needs this file for transpiling GraphQL queries for use with Relay.\n\n## Usage\n\nSee the [Star Wars test schema](https://github.com/graphql-elixir/graphql_relay/blob/master/test/support/star_wars/schema.exs) for a simple example and the [TodoMVC example Phoenix application](https://github.com/graphql-elixir/graphql_relay/blob/master/examples/todo) for a full application example that uses Ecto as well.\n\n* [How to do authentication and authorization in a Phoenix application with GraphQL](https://github.com/graphql-elixir/graphql/wiki/How-to-do-authentication-and-authorization-in-a-Phoenix-application-with-GraphQL)\n\n## Learning GraphQL and Relay\n\nIt's important that you understand GraphQL first and then Relay second. Relay is simply a convention for how to organize a GraphQL schema so that Relay clients can query the GraphQL server in a standard way.\n\n* [GraphQL Introduction](https://facebook.github.io/react/blog/2015/05/01/graphql-introduction.html)\n* [GraphQL: A data query language](https://code.facebook.com/posts/1691455094417024/graphql-a-data-query-language/)\n* [Your First GraphQL Server](https://medium.com/@clayallsopp/your-first-graphql-server-3c766ab4f0a2#.m78ybemas)\n* [Learn GraphQL](https://learngraphql.com/)\n* [GraphQL Specification](https://facebook.github.io/graphql/)\n* [Relay](https://facebook.github.io/relay/)\n* [A Cartoon Guide To Facebook's Relay](https://code-cartoons.com/a-cartoon-intro-to-facebook-s-relay-part-1-3ec1a127bca5#.7kaxn4akk)\n\n## Helpful Tools\n\n* [React [and Relay] Developer Tools](https://github.com/facebook/react-devtools) for Chrome and Firefox.\n","funding_links":[],"categories":["Libraries","Implementations"],"sub_categories":["Elixir Libraries","Elixir"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-elixir%2Fgraphql_relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphql-elixir%2Fgraphql_relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-elixir%2Fgraphql_relay/lists"}