Anchor to marketCreatemarket
marketCreate
mutation
Requires for queries and both
as well as
for mutations.
Creates a new market.
Anchor to Arguments
Arguments
- Anchor to inputinput•Market
Create requiredInput! The properties of the new market.
Was this section helpful?
Anchor to MarketCreatePayload returnsMarketCreatePayload returns
- Anchor to marketmarket•
The market object.
- Anchor to userErrorsuser•
Errors [MarketUser non-nullError!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation marketCreate($input: MarketCreateInput!) {
marketCreate(input: $input) {
market {
# Market fields
}
userErrors {
field
message
}
}
}
Input
{
"input": {
"enabled": true,
"handle": "<your-handle>",
"name": "<your-name>",
"regions": [
{
"countryCode": "AC"
}
]
}
}
{
"input": {
"enabled": true,
"handle": "<your-handle>",
"name": "<your-name>",
"regions": [
{
"countryCode": "AC"
}
]
}
}
input MarketCreateInput {
enabled: Boolean
handle: String
name: String!
regions: [MarketRegionCreateInput!]!
}
input MarketRegionCreateInput {
countryCode: CountryCode!
}