{"id":16701708,"url":"https://github.com/coryodaniel/federated-absinthe","last_synced_at":"2025-06-24T13:32:06.434Z","repository":{"id":47498738,"uuid":"400627330","full_name":"coryodaniel/federated-absinthe","owner":"coryodaniel","description":"Federating absinthe graphql with GraphQL Mesh.","archived":false,"fork":false,"pushed_at":"2021-10-29T17:24:35.000Z","size":130,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T04:12:32.921Z","etag":null,"topics":["absinthe","absinthe-graphql","elixir","graphql"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/coryodaniel.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}},"created_at":"2021-08-27T20:25:06.000Z","updated_at":"2022-04-08T20:56:20.000Z","dependencies_parsed_at":"2022-08-24T08:41:04.939Z","dependency_job_id":null,"html_url":"https://github.com/coryodaniel/federated-absinthe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coryodaniel/federated-absinthe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Ffederated-absinthe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Ffederated-absinthe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Ffederated-absinthe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Ffederated-absinthe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coryodaniel","download_url":"https://codeload.github.com/coryodaniel/federated-absinthe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Ffederated-absinthe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261685559,"owners_count":23194127,"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":["absinthe","absinthe-graphql","elixir","graphql"],"created_at":"2024-10-12T18:45:15.928Z","updated_at":"2025-06-24T13:32:06.405Z","avatar_url":"https://github.com/coryodaniel.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Federating Absinthe Elixir w/ GraphQL Mesh\n\nFederating the Absinthe GraphQL elixir library with GraphQL Mesh.\n## Setup\n\nMac OS Setup\n\n```shell\nbrew install gpg asdf\nasdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git\nasdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git\nasdf install\n```\n\n## Run GraphQL Mesh Example App\n\n[GraphQL Mesh](https://github.com/Urigo/graphql-mesh) includes a [federation example](https://github.com/Urigo/graphql-mesh/tree/master/examples/federation-example) federating 4 nodejs graphs. This example replaces the `accounts` nodejs app with Absinthe.\n\n```shell\nyarn install\nyarn start\n```\n\nThe example query should run successfully.\n\n## How it works\n\nThe GraphQL Mesh config file `.meshrc.yml` contains a list of APIs that can be included in the mesh. GraphQL Mesh supports 12 API sources including GraphQL (with or without federation support), gRPC, OpenAPI, and others.\n\nWhen adding a graphql source that does **not** support federation, a transform can be used.\n\nHere is an example of extending the root query and allowing other fields to access the accounts' user fields.\n\n```yaml\n  - name: accounts\n    handler:\n      graphql:\n        endpoint: http://localhost:9871/graphql\n    transforms:\n      - federation:\n          types:\n            - name: Query # Note: Absinthe defaults the root query type name to \"RootQueryType\"\n              config:\n                extend: true\n            - name: User\n              config:\n                keyFields:\n                  - id\n                resolveReference:\n                  queryFieldName: user\n```\n\nThe query name on line 8 of the YAML above needs to match the name of the root query in Absinthe.\n\n```ex\nquery name: \"Query\" do\n  # ...\nend\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryodaniel%2Ffederated-absinthe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoryodaniel%2Ffederated-absinthe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryodaniel%2Ffederated-absinthe/lists"}