بدون توضیح

Remy-Liu 443a3f15b3 Merge branch 'develop' of Remy-Liu/graphql-demo into master 2 سال پیش
base-module 4bb7cc39b3 update dataloader 4 سال پیش
common-module b1734a4a8c update 4 سال پیش
goods-service d097cda5fd add 4 سال پیش
graphql-api 280c1cf6b8 add uncommit files 4 سال پیش
init-db 4db75ad4fa change script 4 سال پیش
order-service d097cda5fd add 4 سال پیش
user-service 280c1cf6b8 add uncommit files 4 سال پیش
.gitignore 9d5bfbe9fc init 4 سال پیش
README.md 542fc8e212 更新 'README.md' 4 سال پیش
pom.xml 280c1cf6b8 add uncommit files 4 سال پیش

README.md

GraphQL示例

如何运行

初始化

  1. 在本地MySQL中创建数据库graphql-demo
  2. 进入init-db模块,修改pom.xmlflyway插件中数据库配置,改为自己本地的配置

    <configuration>
    <url>${db.url}</url>
    <user>${username}</user>
    <password>${password}</password>
    </configuration>
    

    3.执行:

    mvn flyway:migration
    

运行三个微服务

  • 进入goods-service模块,找到GoodsApplication,运行主函数,启动商品服务
  • 进入user-service模块,找到UserApplication,运行主函数,启动用户服务
  • 进入order-service模块,找到OrderApplication,运行主函数,启动订单服务

运行GraphQL聚合服务

  • 进入graphql-api模块,找到GraphqlApplication,运行主函数,启动GraphQL服务
  • 访问 http://localhost:8080/playground 进入 playground, 开始使用。