You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Wolkenkit能否仅作服务器或适配GraphQL?相关技术问询

Hey there! Let's tackle your wolkenkit questions clearly:

1. Can wolkenkit run as a standalone server, or integrate with GraphQL?

Wolkenkit works perfectly as a standalone server right out of the box—its core is built to handle event-driven workflows, command processing, and read model management entirely on its own, no extra tools required.

As for GraphQL integration, that's totally doable too. By default, wolkenkit exposes read models via REST APIs, so you can easily layer a GraphQL server on top of these endpoints as a gateway. Your GraphQL resolvers would fetch data from wolkenkit's read model endpoints and map it to your GraphQL schema. If you want a more direct approach, you can also extend wolkenkit's functionality to add custom GraphQL support, though the gateway method is usually simpler and more maintainable for most use cases.

2. Using wolkenkit server via HTTP only, with GraphQL for read models

Absolutely—you can use wolkenkit purely over HTTP, ditching its client library entirely. Here's a step-by-step breakdown of what you need to do:

  • Ensure wolkenkit's HTTP API is enabled: By default, wolkenkit exposes a REST API for both commands and read models. Just confirm your server is configured to listen on the correct HTTP port (this is set in your project's package.json or wolkenkit config file).
  • Send commands via HTTP POST: To trigger actions in wolkenkit, send POST requests to endpoints following the pattern http://<your-server>:<port>/commands/<context>/<aggregate>/<command>. The request body needs the aggregate ID, payload, and any required metadata. Example request:
    POST /commands/tasks/task/create
    Content-Type: application/json
    
    {
      "aggregateId": "task-123",
      "payload": {
        "title": "Wrap up wolkenkit HTTP setup"
      }
    }
    
  • Fetch read models via HTTP GET: Wolkenkit serves read models at http://<your-server>:<port>/read-models/<context>/<read-model>. You can filter, sort, and paginate using query parameters. For example, to get all completed tasks sorted by creation date:
    GET /read-models/tasks/completedTasks?filter=status:completed&sort=createdAt:desc
    
  • Build your GraphQL layer: Set up a GraphQL server that acts as a middleman. Your GraphQL resolvers will make HTTP GET requests to wolkenkit's read model endpoints to fetch data, then map that data to your GraphQL schema. For mutations (actions), your GraphQL mutation resolvers will translate to HTTP POST requests to wolkenkit's command endpoints.
  • Skip the client library entirely: Since all interactions use standard HTTP methods, you don't need to install or use the wolkenkit client SDK at all. This gives you full control over your client-side code or GraphQL layer, without being tied to the library's opinions.

内容的提问来源于stack exchange,提问作者ssomnoremac

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:40:42