{"id":50283409,"url":"https://github.com/apollographql/subgraph-template-java-spring-graphql-boilerplate","last_synced_at":"2026-05-28T01:06:58.818Z","repository":{"id":65659975,"uuid":"539571319","full_name":"apollographql/subgraph-template-java-spring-graphql-boilerplate","owner":"apollographql","description":"Template for creating Spring GraphQL Java based subgraphs","archived":false,"fork":false,"pushed_at":"2026-05-17T21:29:28.000Z","size":235,"stargazers_count":5,"open_issues_count":10,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-05-17T23:40:50.348Z","etag":null,"topics":["graphql","graphql-java","java","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apollographql.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-21T15:59:41.000Z","updated_at":"2026-05-17T21:29:31.000Z","dependencies_parsed_at":"2023-10-12T00:50:58.507Z","dependency_job_id":"af146886-b474-4c79-806d-c8f6ae5d1e07","html_url":"https://github.com/apollographql/subgraph-template-java-spring-graphql-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/apollographql/subgraph-template-java-spring-graphql-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fsubgraph-template-java-spring-graphql-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fsubgraph-template-java-spring-graphql-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fsubgraph-template-java-spring-graphql-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fsubgraph-template-java-spring-graphql-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apollographql","download_url":"https://codeload.github.com/apollographql/subgraph-template-java-spring-graphql-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fsubgraph-template-java-spring-graphql-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33589700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["graphql","graphql-java","java","spring-boot"],"created_at":"2026-05-28T01:06:58.083Z","updated_at":"2026-05-28T01:06:58.809Z","avatar_url":"https://github.com/apollographql.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java Spring Federated GraphQL Subgraph\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/Jomu73?referralCode=xsbY2R)\n\nThis is an example application template that can be used to create Federated GraphQL subgraph using [Spring GraphQL](https://spring.io/projects/spring-graphql). You can use this template from [Rover](https://www.apollographql.com/docs/rover/commands/template/) with `rover template use --template subgraph-java-spring-graphql`.\n\nThis example application implements following GraphQL schema:\n\n```graphql\ndirective @contact(\n    \"Contact title of the subgraph owner\"\n    name: String!\n    \"URL where the subgraph's owner can be reached\"\n    url: String\n    \"Other relevant notes can be included here; supports markdown links\"\n    description: String\n) on SCHEMA\n\nschema\n@contact(\n    name: \"FooBar Server Team\"\n    url: \"https://myteam.slack.com/archives/teams-chat-room-url\"\n    description: \"send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).\"\n)\n@link(\n    url: \"https://specs.apollo.dev/federation/v2.0\",\n    import: [\"@key\"]\n) {\n    query: Query\n}\n\ntype Query {\n    foo(id: ID!): Foo\n}\ntype Foo @key(fields: \"id\") {\n    id: ID!\n    name: String\n}\n```\n\n## Build\n\nThis project uses [Maven](https://maven.apache.org/) and requires Java 17+ runtime. In order to build the project locally (which\nwill also execute all the tests), simply run the `clean install` goals.\n\n```shell\n./mvnw clean install\n```\n\n\u003e NOTE: in order to ensure you use the right version of Maven we highly recommend to use the provided wrapper script\n\n### Code Quality\n\nBuild is configured with [`JaCoCo`](https://www.eclemma.org/jacoco/) plugin that measures the code coverage. It is configured\nto run as part of the build lifecycle and will generate its report under `target/site`.\n\nExample integration test is provided. It starts up the SpringBoot server and executes example queries against it. Run\n`verify` goal to execute tests and calculate the coverage.\n\n```shell\n./mvnw clean verify\n```\n\n### Continuous Integration\n\nThis project comes with some example build actions that will trigger on PR requests and commits to the main branch.\n\n## Run\n\nTo start the GraphQL server:\n\n* Run `Application.java` directly from your IDE\n* Alternatively you can also run the Spring Boot plugin directly from the command line\n\n```shell script\n./mvnw spring-boot:run\n```\n\nOnce the app has started you can explore the example schema by opening the GraphQL Playground endpoint at http://localhost:8080/playground and begin developing your supergraph with `rover dev --url http://localhost:8080/graphql --name my-sugraph`.\n\n## Apollo Studio Integration\n\n1. Set these secrets in GitHub Actions:\n    1. APOLLO_KEY: An Apollo Studio API key for the supergraph to enable schema checks and publishing of the\n       subgraph.\n    2. APOLLO_GRAPH_REF: The name of the supergraph in Apollo Studio.\n    3. PRODUCTION_URL: The URL of the deployed subgraph that the supergraph gateway will route to.\n2. Set `SUBGRAPH_NAME` in .github/workflows/checks.yaml and .github/workflows/deploy.yaml\n3. Remove the `if: false` lines from `.github/workflows/checks.yaml` and `.github/workflows/deploy.yaml` to enable schema checks and publishing.\n4. Write your custom deploy logic in `.github/workflows/deploy.yaml`.\n5. Send the `Router-Authorization` header [from your Cloud router](https://www.apollographql.com/docs/graphos/routing/cloud-configuration#managing-secrets) and set the `ROUTER_SECRET` environment variable wherever you deploy this to.\n\n## Additional Resources\n\n* [Spring GraphQL documentation](https://spring.io/projects/spring-graphql)\n* [Spring Boot documentation](https://docs.spring.io/spring-boot/docs/2.7.3/reference/htmlsingle/)\n* [Maven documentation](https://maven.apache.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollographql%2Fsubgraph-template-java-spring-graphql-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapollographql%2Fsubgraph-template-java-spring-graphql-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollographql%2Fsubgraph-template-java-spring-graphql-boilerplate/lists"}