discount types
This list contains all query and input types for the discount endpoints.
Discount
Fields
- Name
id
- Type
- ID!
- Description
Unique identifier for the discount.
- Name
code
- Type
- String!
- Description
The discount code.
- Name
value
- Type
- Float!
- Description
The discount value.
- Name
type
- Type
- DiscountType!
- Description
The discount type.
enum DiscountType { percentage fixed }
- Name
usage_limit
- Type
- Int!
- Description
The discount usage limit.
- Name
usage
- Type
- Int
- Description
The discount usage.
- Name
limited_usage
- Type
- Boolean
- Description
The discount limited usage option.
- Name
one_time_usage_per_customer
- Type
- Boolean
- Description
The discount one time usage per customer option.
- Name
tags
- Type
- [String!]!
- Description
The discount tags.
- Name
active
- Type
- Boolean
- Description
The discount active option.
- Name
product_ids
- Type
- [Int!]!
- Description
The discount product ids.
- Name
created_at
- Type
- TimeStamp!
- Description
Timestamp of when the discount was created.
- Name
started_at
- Type
- TimeStamp!
- Description
Timestamp of when the discount will start.
- Name
expired_at
- Type
- TimeStamp!
- Description
Timestamp of when the discount will expire.
Request
query DiscountsQuery($first: Int, $after: String, $query: String!){
discounts(query: "order_by:id order_dir:desc", after: "WzVE4OTA5LDEe/4OTA5XQ==", first: 10){
edges{
node{
id
name
description
...
}
}
}
}
InputDiscount
Fields
- Name
code
- Type
- String!
- Description
The discount code.
- Name
value
- Type
- Float!
- Description
The discount value.
- Name
type
- Type
- DiscountType!
- Description
The discount type.
enum DiscountType { percentage fixed }
- Name
usage_limit
- Type
- Int!
- Description
The discount usage limit.
- Name
active
- Type
- Boolean
- Description
The discount active option.
- Name
one_time_usage_per_customer
- Type
- Boolean
- Description
The discount one time usage per customer option.
- Name
limited_usage
- Type
- Boolean
- Description
The discount limited usage option.
- Name
tags
- Type
- [String!]!
- Description
The discount tags.
- Name
product_ids
- Type
- [Int!]!
- Description
The discount product ids.
- Name
started_at
- Type
- TimeStamp!
- Description
Timestamp of when the discount will start.
- Name
expired_at
- Type
- TimeStamp!
- Description
Timestamp of when the discount will expire.
InputUpdateDiscount
Fields
- Name
code
- Type
- String
- Description
The discount code.
- Name
value
- Type
- Float
- Description
The discount value.
- Name
type
- Type
- DiscountType
- Description
The discount type.
enum DiscountType { percentage fixed }
- Name
usage_limit
- Type
- Int
- Description
The discount usage limit.
- Name
active
- Type
- Boolean
- Description
The discount active option.
- Name
one_time_usage_per_customer
- Type
- Boolean
- Description
The discount one time usage per customer option.
- Name
limited_usage
- Type
- Boolean
- Description
The discount limited usage option.
- Name
tags
- Type
- [String!]
- Description
The discount tags.
- Name
product_ids
- Type
- [Int!]
- Description
The discount product ids.
- Name
started_at
- Type
- TimeStamp
- Description
Timestamp of when the discount will start.
- Name
expired_at
- Type
- TimeStamp
- Description
Timestamp of when the discount will expire.
updateDiscountMutationInput
Fields
- Name
id
- Type
- ID!
- Description
Unique identifier for the discount.
- Name
node
- Label
InputUpdateDiscount!
- Description
The discount node.
- Name
clientMutationId
- Type
- String
- Description
The discount client mutation id.
Request
mutation mutationName($input: updateDiscountMutationInput!) {
updateDiscount(node: $node){
# updateDiscountMutationPayload type fields
}
}
createDiscountMutationInput
Fields
- Name
node
- Label
InputDiscount!
- Description
The discount node.
- Name
clientMutationId
- Type
- String
- Description
The discount client mutation id.
Request
mutation mutationName($input: createDiscountMutationInput!) {
createDiscount(node: $node){
# createDiscountMutationPayload type fields
}
}
updateDiscountMutationPayload
Fields
- Name
node
- Label
Discount!
- Description
The discount node.
- Name
clientMutationId
- Type
- String
- Description
The discount client mutation id.
createDiscountMutationPayload
Fields
- Name
node
- Label
Discount!
- Description
The discount node.
- Name
clientMutationId
- Type
- String
- Description
The discount client mutation id.
DiscountConnection
Fields
- Name
pageInfo
- Type
- PageInfo!
- Description
Discount connection page info.
type PageInfo { hasNextPage: Boolean! hasPreviousPage: Boolean! startCursor: String endCursor: String }
- Name
edges
- Type
- [DiscountEdge]
- Description
The Discount connection edges.
type DiscountEdge { node: Discount cursor: String! }