reimagined / resolve

Full stack CQRS, DDD, Event Sourcing framework for Node.js

Home Page:https://reimagined.github.io/resolve/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My read model returns only one entity

IgnatovDan opened this issue · comments

Describe the bug
I am working with tutorial https://reimagined.github.io/resolve/docs/tutorial/ and finished the https://reimagined.github.io/resolve/docs/tutorial/#lesson-2---read-side---create-a-read-model-to-query-shopping-lists step.

I created several entities using this command:
curl http://localhost:3000/api/commands -H "Content-Type: application/json" -X POST -d @createShoppingList.xml
+

{
  "aggregateName": "ShoppingList",
  "type": "createShoppingList",
  "aggregateId": "shopping-list-2022_-2_22_3", - here I passed several different ids
  "payload": {
    "name": "List 2022_-2_22_3"
  }
}

In console, I have seen that each connand was processed and 'createShoppingList' was finished.

However, I cannot get all entities using this command:
curl http://localhost:3000/api/query/ShoppingLists/all -H "Content-Type: application/json"

Command is finished successfully, but only the first entity is returned.

I successfully created several new entities and executed new requests to 'ShoppingLists/all' but each returns one entity again.

To Reproduce
Don't know.

Expected behavior
All entities are returned.

Screenshots
no

Desktop (please complete the following information):

  • OS: Windows
  • Browser: no
  • Node.js Version: v16.13.0.
  • ReSolve Version: "@resolve-js/core@0.33.14": from yarn.lock