Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Support Update Mutations like count_add or count_reduce in field Int ? #2476

Closed
baby1990 opened this issue May 20, 2018 · 1 comment
Closed

Comments

@baby1990
Copy link

baby1990 commented May 20, 2018

I love this frameWork! But I got some problem when i tried to use it to design a online market. I can't deal with some data in mutations, such as the amount of a product.
Is there some mutations like this:

mutation {
    updateProduct(
        where: {
            id: "ID"
        }, 
        data: { 
           salesAmount: { 
               count_add: 1
           },
           stockQuantity: { 
              count_reduce: 1 
           }
        }
    )
}```
@baby1990 baby1990 reopened this May 20, 2018
@baby1990 baby1990 changed the title Support Update Mutations like count_add Or count_reduce in field Int ? Support Update Mutations like count_add or count_reduce in field Int ? May 20, 2018
@marktani
Copy link
Contributor

marktani commented Jun 4, 2018

Thanks a lot for this feature request. There are some discussions around current work arounds for this in the Forum, and we are thinking about adding atomic operations directly into the Prisma API. You can follow this feature request to stay notified of our progress here 🙂

@marktani marktani closed this as completed Jun 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants