Aucune description

Remy-Liu a63a2ee292 更新 'README.md' il y a 4 ans
base-module 4bb7cc39b3 update dataloader il y a 4 ans
common-module b1734a4a8c update il y a 4 ans
goods-service d097cda5fd add il y a 4 ans
graphql-api b1734a4a8c update il y a 4 ans
init-db 45004509d2 add flyway and init db script il y a 4 ans
order-service 45004509d2 add flyway and init db script il y a 4 ans
user-service d097cda5fd add il y a 4 ans
.gitignore 9d5bfbe9fc init il y a 4 ans
README.md a63a2ee292 更新 'README.md' il y a 4 ans
pom.xml 45004509d2 add flyway and init db script il y a 4 ans
初识GraphQL.pptx d097cda5fd add il y a 4 ans

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
    

    运行三个微服务

  3. 进入goods-service模块,找到GoodsApplication,运行主函数,启动商品服务

  4. 进入user-service模块,找到UserApplication,运行主函数,启动用户服务

  5. 进入order-service模块,找到OrderApplication,运行主函数,启动订单服务

运行GraphQL聚合服务

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