{"id":13499671,"url":"https://github.com/sangria-graphql/sangria-akka-http-example","last_synced_at":"2025-03-29T05:31:56.400Z","repository":{"id":35523782,"uuid":"39794397","full_name":"sangria-graphql/sangria-akka-http-example","owner":"sangria-graphql","description":"An example GraphQL server written with akka-http, circe and sangria","archived":false,"fork":false,"pushed_at":"2024-09-17T13:18:25.000Z","size":185,"stargazers_count":241,"open_issues_count":6,"forks_count":100,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-09-17T16:35:34.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sangria-graphql.github.io","language":"Scala","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/sangria-graphql.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}},"created_at":"2015-07-27T19:46:29.000Z","updated_at":"2024-09-17T13:18:29.000Z","dependencies_parsed_at":"2024-02-07T12:45:14.461Z","dependency_job_id":"0e50f496-2789-4b1e-b741-458c3f22f04b","html_url":"https://github.com/sangria-graphql/sangria-akka-http-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangria-graphql%2Fsangria-akka-http-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangria-graphql%2Fsangria-akka-http-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangria-graphql%2Fsangria-akka-http-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangria-graphql%2Fsangria-akka-http-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sangria-graphql","download_url":"https://codeload.github.com/sangria-graphql/sangria-akka-http-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222465548,"owners_count":16989038,"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":[],"created_at":"2024-07-31T22:00:38.022Z","updated_at":"2024-10-31T18:30:58.711Z","avatar_url":"https://github.com/sangria-graphql.png","language":"Scala","funding_links":[],"categories":["Examples","Scala","Implementations","\u003ca name=\"Scala\"\u003e\u003c/a\u003eScala"],"sub_categories":["Scala Examples","Scala"],"readme":"## Sangria akka-http Example\n\nAn example [GraphQL](https://graphql.org) server written with [akka-http](https://github.com/akka/akka-http), [circe](https://github.com/circe/circe) and [sangria](https://github.com/sangria-graphql/sangria).\n\n[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)\n\nAfter starting the server with\n\n```bash\nsbt run\n\n# or, if you want to watch the source code changes\n \nsbt ~reStart\n``` \n\nyou can run queries interactively using [graphql-playground](https://github.com/prisma/graphql-playground) by opening [http://localhost:8080](http://localhost:8080) in a browser or query the `/graphql` endpoint directly. The HTTP endpoint follows [GraphQL best practices for handling the HTTP requests](http://graphql.org/learn/serving-over-http/#http-methods-headers-and-body).\n\nHere are some examples of the queries you can make:\n\n```bash\n$ curl -X POST localhost:8080/graphql \\\n  -H \"Content-Type:application/json\" \\\n  -d '{\"query\": \"{hero {name, friends {name}}}\"}'\n```\n\nthis gives back the hero of StarWars Saga together with the list of his friends, which is of course R2-D2:\n\n```json\n{\n  \"data\": {\n    \"hero\": {\n      \"name\": \"R2-D2\",\n      \"friends\": [\n        {\n          \"name\": \"Luke Skywalker\"\n        },\n        {\n          \"name\": \"Han Solo\"\n        },\n        {\n          \"name\": \"Leia Organa\"\n        }\n      ]\n    }\n  }\n}\n```\n\nHere is another example, which uses variables:\n\n```bash\n$ curl -X POST localhost:8080/graphql \\\n  -H \"Content-Type:application/json\" \\\n  -d '{\"query\": \"query Test($humanId: String!){human(id: $humanId) {name, homePlanet, friends {name}}}\", \"variables\": {\"humanId\": \"1000\"}}'\n```\n\nThe result should be something like this:\n\n```json\n{\n  \"data\": {\n    \"human\": {\n      \"name\": \"Luke Skywalker\",\n      \"homePlanet\": \"Tatooine\",\n      \"friends\": [\n        {\n          \"name\": \"Han Solo\"\n        },\n        {\n          \"name\": \"Leia Organa\"\n        },\n        {\n          \"name\": \"C-3PO\"\n        },\n        {\n          \"name\": \"R2-D2\"\n        }\n      ]\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangria-graphql%2Fsangria-akka-http-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsangria-graphql%2Fsangria-akka-http-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangria-graphql%2Fsangria-akka-http-example/lists"}