Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Filters behavior #47

Open
JBBianchi opened this issue Feb 19, 2025 · 0 comments
Open

Unexpected Filters behavior #47

JBBianchi opened this issue Feb 19, 2025 · 0 comments
Labels
api bug Something isn't working priority: high
Milestone

Comments

@JBBianchi
Copy link
Member

I tried this:

With a CartItem:

_id: foo
_metadata:
  createdAt: 2025-02-14T11:42:53.5560742+01:00
  lastModified: 2025-02-17T12:34:03.4241562+01:00
  version: 12
orderId: order-1
productId: coca-cola-light-33cl
quantity: 4
product:
  _metadata:
    createdAt: 2025-02-14T10:18:24.4806873+01:00
    lastModified: 2025-02-14T10:18:24.4806920+01:00
    version: 1
  name: Coca Cola Light 33cl
  description: A 33cl can of Coca Cola Light
  price:
    value: 0.99
    currency: USD

Querying the API with:
/api/cartItems?filters[orderId]=order-1

This happened:

The response is:

{"items":[]}

I expected this:

The response items to be populated and to have a totalCount property.

{
    "items": [
        {
            "_id": "foo",
            "_metadata": {
                "createdAt": "2025-02-14T11:42:53.5560742+01:00",
                "lastModified": "2025-02-17T12:34:03.4241562+01:00",
                "version": 12
            },
            "orderId": "order-1",
            "productId": "coca-cola-light-33cl",
            "quantity": 4,
            "product": {
                "_metadata": {
                    "createdAt": "2025-02-14T10:18:24.4806873+01:00",
                    "lastModified": "2025-02-14T10:18:24.4806920+01:00",
                    "version": 1
                },
                "name": "Coca Cola Light 33cl",
                "description": "A 33cl can of Coca Cola Light",
                "price": {
                    "value": 0.99,
                    "currency": "USD"
                }
            }
        }
    ],
    "totalCount": 1
}

Is there a workaround?

No response

Anything else?

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞
@JBBianchi JBBianchi added api bug Something isn't working priority: high labels Feb 19, 2025
@JBBianchi JBBianchi added this to the v1.0.0 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api bug Something isn't working priority: high
Projects
Status: No status
Development

No branches or pull requests

1 participant