{"id":15679923,"url":"https://github.com/v5tech/graphql-example","last_synced_at":"2025-05-07T11:04:43.500Z","repository":{"id":149461724,"uuid":"115615756","full_name":"v5tech/graphql-example","owner":"v5tech","description":"graphql spring boot example","archived":false,"fork":false,"pushed_at":"2017-12-28T11:22:45.000Z","size":1274,"stargazers_count":11,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T11:03:09.271Z","etag":null,"topics":["graphql","graphql-java"],"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/v5tech.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}},"created_at":"2017-12-28T11:14:55.000Z","updated_at":"2019-10-31T05:24:15.000Z","dependencies_parsed_at":"2023-04-19T03:16:41.984Z","dependency_job_id":null,"html_url":"https://github.com/v5tech/graphql-example","commit_stats":null,"previous_names":["v5tech/graphql-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fgraphql-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fgraphql-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fgraphql-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fgraphql-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v5tech","download_url":"https://codeload.github.com/v5tech/graphql-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252865704,"owners_count":21816307,"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","graphql-java"],"created_at":"2024-10-03T16:39:10.943Z","updated_at":"2025-05-07T11:04:43.437Z","avatar_url":"https://github.com/v5tech.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-example\n\n* GraphQL Schema\n\nhttp://localhost:8080/graphql/schema.json\n\n![](Screenshots/graphql_schema.json.png)\n\n* GraphiQL\n\nhttp://localhost:8080/graphiql\n\n![](Screenshots/graphiql.png)\n\n* 操作演示\n\nGraphiQL操作演示\n\n![](Screenshots/graphql.gif)\n\nPostman操作演示\n\nGET方式\n\n`\nhttp://localhost:8080/graphql?query={findAllBooks{title pageCount isbn author{firstName lastName}}}\n`\n\n对原字符串`{findAllBooks{title pageCount isbn author{firstName lastName}}}`进行`UrlEncode`编码\n\n`\nhttp://localhost:8080/graphql?query=%7BfindAllBooks%7Btitle%20pageCount%20isbn%20author%7BfirstName%20lastName%7D%7D%7D\n`\n\n![](Screenshots/postman_get.png)\n\nPOST方式直接提交json\n\n`GraphiQL`中查询语法为：\n\n`\n{\n  findAllBooks {\n    title\n    pageCount\n    isbn\n    author {\n      firstName\n      lastName\n    }\n  }\n}\n`\n\n`Postman`中查询语法为:\n\n`\n{\n    \"query\":\"{findAllBooks {title pageCount isbn author {firstName lastName}}}\"\n}`\n\n提交的url仍为 http://localhost:8080/graphql\n\n![](Screenshots/postman_post.png)\n\n操作演示\n\n![](Screenshots/graphql-postman.gif)\n\n参考文档\n\nhttps://www.pluralsight.com/guides/java-and-j2ee/building-a-graphql-server-with-spring-boot\n\nhttps://blog.pusher.com/writing-graphql-service-using-kotlin-spring-boot\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv5tech%2Fgraphql-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv5tech%2Fgraphql-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv5tech%2Fgraphql-example/lists"}