Mutations

The root Mutation type in a GraphQL schema defines all the write operations that can change data. It is analogous to performing HTTP verbs such as POST, PATCH, and DELETE.

Mutations can take arguments as input similar to the body of a POST request in REST. Like GraphQL queries, mutations can also return fields. This can be useful for fetching the new state of an object after an update.


StockActivity#

note

To understand the use of the `createStockActivity' mutation, you can refer to this guide.

When performing the mutation createStockActivity, the stock property of the related Variant will be updated (added or removed) according to the movement made in that mutation.

This is the basic principle of stock management made by the Wino system.

Field/argumentTypeDescription
createStockActivityStockActivity!Creates a new stock activity.
inputInputStockActivity!Specifies the fields to use when creating the stock activity.

InputStockActivity#

FieldTypeDescription
kindStockActivityKind!

The type of this stock activity. Some types can increment the stock, others can decrement it or reset it.

quantityInt!

The quantity associated to this stock activity.

commentString

A comment about this stock activity.

reasonStockActivityLossReason

Represents the possible reasons why the stockActivity was classified as a LOSS.

stockKeepingUnitString

A unique identifier assigned to each activity.

capacityUnitString

The unit used in this stock activity.

capacityPrecisionInt

The decimal accuracy of stock activity capacity.

variantIdString!

The variant reference.

deviceIdString!

The device associated to this stock activity.

shopIdString!

The shop associated to this stock activity.