{"id":19913614,"url":"https://github.com/ravisankarchinnam/spring-boot-graphql","last_synced_at":"2025-09-19T02:32:45.043Z","repository":{"id":218162811,"uuid":"144682875","full_name":"ravisankarchinnam/spring-boot-graphQL","owner":"ravisankarchinnam","description":"Spring Boot GraphQL Api Example/Implementation","archived":false,"fork":false,"pushed_at":"2018-08-16T07:44:18.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T06:22:33.703Z","etag":null,"topics":["graphiql","graphql","h2","rest","spring-boot","swagger"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/ravisankarchinnam.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-14T07:12:12.000Z","updated_at":"2024-09-18T09:24:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a93f650-fc8f-47f4-9bcb-962e7ae7cf0c","html_url":"https://github.com/ravisankarchinnam/spring-boot-graphQL","commit_stats":null,"previous_names":["ravisankarchinnam/spring-boot-graphql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ravisankarchinnam/spring-boot-graphQL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravisankarchinnam%2Fspring-boot-graphQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravisankarchinnam%2Fspring-boot-graphQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravisankarchinnam%2Fspring-boot-graphQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravisankarchinnam%2Fspring-boot-graphQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravisankarchinnam","download_url":"https://codeload.github.com/ravisankarchinnam/spring-boot-graphQL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravisankarchinnam%2Fspring-boot-graphQL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275868806,"owners_count":25543024,"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","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"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":["graphiql","graphql","h2","rest","spring-boot","swagger"],"created_at":"2024-11-12T21:33:32.373Z","updated_at":"2025-09-19T02:32:44.757Z","avatar_url":"https://github.com/ravisankarchinnam.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL-Spring-boot Application: \n\nThis Standalone Spring boot project demonstrates the crud operations on Tour services using GraphQL as API.\n\n\n[![Build Status](https://travis-ci.org/ravisankarchinnam/spring-boot-graphQL.svg?branch=master)](https://travis-ci.org/ravisankarchinnam/spring-boot-graphQL)\n\n## 1. In Memory H2 Database is used.\n    So you can modify application.properies as per your loving database. \n\n## 2. Running as a Packaged Application (Following ways)\n    Way-1 : java -jar target/spring-boot-graphql-0.0.1-SNAPSHOT.war\n\n    Way-2 : mvn spring-boot:run (using maven)\n\n## 3. Once the application is started you can access http://localhost:8080/graphiql\n    ![GraphiQL](screen-shots/graphiql.PNG)\n\n## Testing the Application:\n\n## GraphQL\n\n### To retrieve AllTours:\n    ```\n    GraphiQL Syntax:\n        query {\n          allTours {\n            name\n            type\n            description\n            agency {\n              name\n              rating\n            }\n          }\n        }\n    \n    JSON/postman syntax:\n        {\n            \"query\":\"{allTours{name type description agency {name rating} }}\"\n        }\n    ```\n### To createTour:\n    ```\n    GraphiQL Syntax:\n        mutation {\n          createTour(input: {name:\"India\", price:\"34543.43\",duration:\"3\", type:LUXURY,agency:1}){\n            name\n          }\n        }\n    \n    JSON/postman syntax:\n        {\n        \"query\": \"mutation createTour($input: CreateTourInput!) {createTour(input: $input){name}}\",\"variables\":{\"input\": {\"name\":\"India\", \"price\":\"34543.43\",\"duration\":\"3\", \"type\":\"LUXURY\",\"agency\":1} },\"operationName\":\"createTour\"\n        }\n    ```\n### To retrieve a single Tour:\n    ```\n    GraphiQL Syntax:\n        query {\n          tour(id:1){\n            name\n            description\n            type\n            agency{\n              name\n              rating\n            }\n          }\n        }\n    \n    JSON/postman syntax:\n        {\n            \"query\":\"{tour(id:1){name description}}\"\n        }\n    ```\n## To delete a Tour:\n    ```\n    GraphiQL Syntax:\n        mutation {\n          deleteTour(id:10)\n        }\n    \n    JSON/postman syntax:\n        {\n            \"query\": \"mutation deleteTour {deleteTour(id:4)}\",\"variables\":null,\"operationName\":\"deleteTour\"\n        }\n    ```   \n### To updateTour:\n    ```\n    GraphiQL Syntax:\n        mutation \n        {\n          updateTour(input: {id: 4, name:\"India\", price:\"986666.43\",duration:\"3\", type:LUXURY,agency:1}){\n            name\n          }\n        }\n    \n    JSON/postman syntax:\n        {\n        \"query\": \"mutation updateTour($input: UpdateTourInput!) {updateTour(input: $input){name}}\",\"variables\":{\"input\": {\"id\":4, \"name\":\"India\", \"price\":\"908765.43\",\"duration\":\"3\", \"type\":\"LUXURY\",\"agency\":1} },\"operationName\":\"updateTour\"\n        }\n    ``` \n## To retrieve allAgencies:\n    ```\n    GraphiQL Syntax:\n        query{\n          allAgencies{\n            name\n          }\n        }\n    \n    JSON/postman syntax:\n        {\n            \"query\":\"{allAgencies{name rating}}\"\n        }\n    ```\n### To retrieve a single Agency:\n    ```\n    GraphiQL Syntax:\n        query {\n          agency(id:1){\n            name\n            rating\n          }\n        }\n    \n    JSON/postman syntax:\n        {\n            \"query\":\"{agency(id:1){name rating}}\"\n        }\n    ```    \n## To update Agency rating:\n    ```\n    GraphiQL Syntax:\n        mutation{\n          updateAgencyRating(id:1, rating:5){\n            rating\n            name\n          }\n        }\n    \n    JSON/postman syntax:\n        {\n        \t\"query\":\"mutation updateAgencyRating {updateAgencyRating(id:1, rating:2){name rating}}\", \"operationName\": \"updateAgencyRating\"\n        }\n    ```\n## REST:\n\n    Swagger UI is configured in this application to provide rest endpoints. So if you want to test the services using REST URL's,\n    you can visit http://localhost:8080/swagger-ui.html\n    \n    Tour: http://localhost:8080/api/rest/tour/\n    Agency: http://localhost:8080/api/rest/agency/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravisankarchinnam%2Fspring-boot-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravisankarchinnam%2Fspring-boot-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravisankarchinnam%2Fspring-boot-graphql/lists"}