{"id":13565786,"url":"https://github.com/atlassian-labs/nadel","last_synced_at":"2025-04-12T20:42:43.040Z","repository":{"id":36988242,"uuid":"121346908","full_name":"atlassian-labs/nadel","owner":"atlassian-labs","description":"A GraphQL execution engine for distributed schemas","archived":false,"fork":false,"pushed_at":"2025-03-12T04:04:30.000Z","size":8238,"stargazers_count":159,"open_issues_count":14,"forks_count":23,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-04T00:08:16.171Z","etag":null,"topics":["graphql"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atlassian-labs.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2018-02-13T06:24:16.000Z","updated_at":"2025-02-11T01:55:12.000Z","dependencies_parsed_at":"2023-10-04T13:19:36.272Z","dependency_job_id":"45cc3b44-dcd6-4f37-baa2-9bcda4468f55","html_url":"https://github.com/atlassian-labs/nadel","commit_stats":{"total_commits":1431,"total_committers":29,"mean_commits":49.3448275862069,"dds":0.742837176799441,"last_synced_commit":"d9bb3cf1f301c685ca6d578279c4b2c6d6a74158"},"previous_names":["graphql-java/nadel"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlassian-labs%2Fnadel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlassian-labs%2Fnadel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlassian-labs%2Fnadel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlassian-labs%2Fnadel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atlassian-labs","download_url":"https://codeload.github.com/atlassian-labs/nadel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631669,"owners_count":21136554,"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":["graphql"],"created_at":"2024-08-01T13:01:55.472Z","updated_at":"2025-04-12T20:42:43.017Z","avatar_url":"https://github.com/atlassian-labs.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# Nadel: A distributed GraphQL engine\n\nNadel is a Kotlin library to combine several GraphQL services together. This is achieved by combining several underlying\nGraphQL services (schemas) into one schema (overall schema).\n\nThe main purpose of this library is to power a GraphQL gateway which serves as the entry point for executing requests\nacross different services while presenting one GraphQL API.\n\n![Nadel GraphQL Gateway](docs/nadel-graphql-gateway.png)\n\n## Features\n\n- Compatible with Java codebases.\n- Directive based approach. Existing GraphQL tooling will continue to work.\n- Flexible GraphQL transform API. Modify fields and service call responses programmatically using the API.\n- Explicit overall schema design: if a schema member is not declared in the `.nadel` file it is not exposed.\n- Hydration: resolves references to other objects by calling other services.\n- Batching: hydration calls can be automatically batched with a configurable max batch size per call.\n- Field rename: fields can be given new names in the context of the exposed schema.\n- Type rename: types can be given new names in the context of the exposed schema.\n- Dynamic service resolution: _ability to_ programmatically decide which service is called for a top level field.\n\n## Example\n\nLet's assume we have two services: \"Issues\" and \"Users\". One has exposes issues and one has users. An `Issue` has a\nreference to its author `User`.\n\nThis is the schema for the Issues service:\n\n```graphql\ntype Query {\n    issues: [Issue]\n}\ntype Issue {\n    id: ID\n    authorId: ID\n}\n```\n\nAnd this is the Users service:\n\n```graphql\ntype Query {\n    users(ids: [ID]): [User]\n}\ntype User {\n    id: ID\n    fullName: String\n}\n```\n\nYou can define a combined Nadel schema as follows.\n\n```graphql\n# In Issue.nadel\ntype Query {\n    issues: [Issue]\n}\ntype Issue {\n    id: ID\n    author: User @hydrated(\n        # This fetches users in batches\n        field: \"users\"\n        arguments: [{ name: \"ids\" value: \"$source.authorId\" }]\n        inputIdentifiedBy: [{ sourceId: \"authorId\" resultId: \"id\" }]\n    )\n}\n\n# In User.nadel\ntype Query {\n    users(ids: [ID]): [User]\n}\ntype User {\n    id: ID\n    name: String @renamed(from: \"fullName\")\n}\n```\n\nThe result is a new GraphQL API which combines the two services in one and has the following schema:\n\n```graphql\ntype Query {\n    issues: [Issue]\n    users(ids: [ID]): [User]\n}\ntype Issue {\n    id: ID\n    authors: [User]\n}\ntype User {\n    id: ID\n    name: String\n}\n``` \n\nThe outside world does not know about the transformations applied by Nadel. It can simply query the data and Nadel will\nhandle the rest e.g. under the hood Nadel will invoke Users for `users` data if `Issue.author` is requested for.\n\nYou can visit\nour [test fixtures folder](https://github.com/atlassian-labs/nadel/tree/master/test/src/test/resources/fixtures) for\nmany more examples.\n\n# Dev setup\n\nIn order to run the tests from `EngineTests` in IntelliJ you need to have the KoTest plugin installed.\n\n[Understanding Nadel](./docs/Primer.MD).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlassian-labs%2Fnadel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatlassian-labs%2Fnadel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlassian-labs%2Fnadel/lists"}