FashOn GraphQL API Reference
This is the FashOn GraphQL API Reference.
Terms of Service
API Endpoints
https://api-staging.fashon.io/graphql
Headers
# Some API may need token to access
Authorization: Bearer <YOUR_TOKEN_HERE>
Version
1.0.0
Queries
brand
Example
Query
query brand($id: ObjectId!) {
brand(id: $id) {
id
name
phone
email
website
logo {
...ImageFragment
}
membership
theme {
...ThemeFragment
}
contractStartedAt
contractEndedAt
createdAt
updatedAt
}
}
Variables
{"id": ObjectId}
Response
{
"data": {
"brand": {
"id": ObjectId,
"name": "abc123",
"phone": "abc123",
"email": "xyz789",
"website": "xyz789",
"logo": Image,
"membership": "PER_MONTH_30K",
"theme": Theme,
"contractStartedAt": "2007-12-03T10:15:30Z",
"contractEndedAt": "2007-12-03T10:15:30Z",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
brands
Response
Returns [Brand]!
Arguments
| Name | Description |
|---|---|
keyword - String
|
If keyword is provided, this query will return the brands that match the keyword |
cursor - ObjectId
|
the cursor is the last object id u get in the last page if not provided, this query will return the first page |
limit - Int!
|
limit control the number of objects to be returned |
Example
Query
query brands(
$keyword: String,
$cursor: ObjectId,
$limit: Int!
) {
brands(
keyword: $keyword,
cursor: $cursor,
limit: $limit
) {
id
name
phone
email
website
logo {
...ImageFragment
}
membership
theme {
...ThemeFragment
}
contractStartedAt
contractEndedAt
createdAt
updatedAt
}
}
Variables
{
"keyword": "xyz789",
"cursor": ObjectId,
"limit": 987
}
Response
{
"data": {
"brands": [
{
"id": ObjectId,
"name": "abc123",
"phone": "abc123",
"email": "xyz789",
"website": "xyz789",
"logo": Image,
"membership": "PER_MONTH_30K",
"theme": Theme,
"contractStartedAt": "2007-12-03T10:15:30Z",
"contractEndedAt": "2007-12-03T10:15:30Z",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
]
}
}
contact
Example
Query
query contact($id: ObjectId!) {
contact(id: $id) {
id
appellation
company
jobTitle
email
content
reason
createdAt
}
}
Variables
{"id": ObjectId}
Response
{
"data": {
"contact": {
"id": ObjectId,
"appellation": "xyz789",
"company": "abc123",
"jobTitle": "xyz789",
"email": "xyz789",
"content": "xyz789",
"reason": "TRY_OUT",
"createdAt": "2007-12-03T10:15:30Z"
}
}
}
contacts
Response
Returns [Contact]!
Arguments
| Name | Description |
|---|---|
reason - ContactReason
|
Example
Query
query contacts($reason: ContactReason) {
contacts(reason: $reason) {
id
appellation
company
jobTitle
email
content
reason
createdAt
}
}
Variables
{"reason": "TRY_OUT"}
Response
{
"data": {
"contacts": [
{
"id": ObjectId,
"appellation": "xyz789",
"company": "abc123",
"jobTitle": "xyz789",
"email": "xyz789",
"content": "xyz789",
"reason": "TRY_OUT",
"createdAt": "2007-12-03T10:15:30Z"
}
]
}
}
feedback
Example
Query
query feedback($id: ObjectId!) {
feedback(id: $id) {
id
user {
...UserFragment
}
reason
note
createdAt
}
}
Variables
{"id": ObjectId}
Response
{
"data": {
"feedback": {
"id": ObjectId,
"user": User,
"reason": "NOT_REALISTIC",
"note": "abc123",
"createdAt": "2007-12-03T10:15:30Z"
}
}
}
feedbacks
Response
Returns [Feedback]!
Arguments
| Name | Description |
|---|---|
userId - ObjectId
|
|
reason - FeedbackReason
|
Example
Query
query feedbacks(
$userId: ObjectId,
$reason: FeedbackReason
) {
feedbacks(
userId: $userId,
reason: $reason
) {
id
user {
...UserFragment
}
reason
note
createdAt
}
}
Variables
{"userId": ObjectId, "reason": "NOT_REALISTIC"}
Response
{
"data": {
"feedbacks": [
{
"id": ObjectId,
"user": User,
"reason": "NOT_REALISTIC",
"note": "abc123",
"createdAt": "2007-12-03T10:15:30Z"
}
]
}
}
garment
Example
Query
query garment($id: ObjectId!) {
garment(id: $id) {
id
name
description
brand {
...BrandFragment
}
siteUrl
gender
cover
defaultPrice
sizes {
...SizeFragment
}
styles {
...StyleFragment
}
createdAt
updatedAt
predictedSize {
...PredictedSizeFragment
}
}
}
Variables
{"id": ObjectId}
Response
{
"data": {
"garment": {
"id": ObjectId,
"name": "xyz789",
"description": "xyz789",
"brand": Brand,
"siteUrl": "xyz789",
"gender": 987,
"cover": "TOP",
"defaultPrice": 123,
"sizes": [Size],
"styles": [Style],
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"predictedSize": PredictedSize
}
}
}
garments
Response
Returns [Garment]!
Arguments
| Name | Description |
|---|---|
brandId - ObjectId
|
specify brand id to get the list of brand's garments if not provided, this will return random result sorted by time |
gender - Int
|
specify gender to get garments for male or female 0 represent for female 1 represent for male if not provided, the returning garments will not consider gender |
cursor - ObjectId
|
the cursor is the last object id u get in the last page if not provided, this query will return the first page |
tagIds - [ObjectId!]
|
use custom tag to search for garments this custom tag is defined by brand owner you can specify multiple tagIds to get garments that match some of the tags, but all the tags must under the same brand that is, if you specify tagIds, you can ignore brandId (provide brandId or not will not affect the result) |
minPrice - Int
|
price filter is used to filter garments by price |
maxPrice - Int
|
|
limit - Int!
|
limit control the number of objects to be returned |
Example
Query
query garments(
$brandId: ObjectId,
$gender: Int,
$cursor: ObjectId,
$tagIds: [ObjectId!],
$minPrice: Int,
$maxPrice: Int,
$limit: Int!
) {
garments(
brandId: $brandId,
gender: $gender,
cursor: $cursor,
tagIds: $tagIds,
minPrice: $minPrice,
maxPrice: $maxPrice,
limit: $limit
) {
id
name
description
brand {
...BrandFragment
}
siteUrl
gender
cover
defaultPrice
sizes {
...SizeFragment
}
styles {
...StyleFragment
}
createdAt
updatedAt
predictedSize {
...PredictedSizeFragment
}
}
}
Variables
{
"brandId": ObjectId,
"gender": 123,
"cursor": ObjectId,
"tagIds": [ObjectId],
"minPrice": 987,
"maxPrice": 123,
"limit": 987
}
Response
{
"data": {
"garments": [
{
"id": ObjectId,
"name": "xyz789",
"description": "abc123",
"brand": Brand,
"siteUrl": "abc123",
"gender": 123,
"cover": "TOP",
"defaultPrice": 123,
"sizes": [Size],
"styles": [Style],
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"predictedSize": PredictedSize
}
]
}
}
image
Example
Query
query image($id: ObjectId!) {
image(id: $id) {
id
originalUrl
variant {
...AvailableImageFragment
}
createdAt
updatedAt
}
}
Variables
{"id": ObjectId}
Response
{
"data": {
"image": {
"id": ObjectId,
"originalUrl": "abc123",
"variant": AvailableImage,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
model3ds
Description
The return value is a list of 3d model download urls from GCS.
Response
Returns a Model3ds!
Arguments
| Name | Description |
|---|---|
userId - ObjectId!
|
User id is used to determine the user's matched 3d model. |
garmentMDs - [GarmentMD]!
|
The list of garment metadata, and the selected garment type should be in the following combination:
|
Example
Query
query model3ds(
$userId: ObjectId!,
$garmentMDs: [GarmentMD]!
) {
model3ds(
userId: $userId,
garmentMDs: $garmentMDs
) {
garmentUrls
human3d {
...Human3DFragment
}
human3dSource
}
}
Variables
{
"userId": ObjectId,
"garmentMDs": [GarmentMD]
}
Response
{
"data": {
"model3ds": {
"garmentUrls": ["xyz789"],
"human3d": Human3D,
"human3dSource": "DEFAULT"
}
}
}
shape
Example
Query
query shape($userId: ObjectId!) {
shape(userId: $userId) {
id
height
shoulder
bust
upperBust
underBust
arm
bodyLength
waist
hip
thigh
leg
createdAt
updatedAt
measureMethod
status
}
}
Variables
{"userId": ObjectId}
Response
{
"data": {
"shape": {
"id": ObjectId,
"height": 123.45,
"shoulder": 123.45,
"bust": 123.45,
"upperBust": 123.45,
"underBust": 123.45,
"arm": 123.45,
"bodyLength": 987.65,
"waist": 987.65,
"hip": 987.65,
"thigh": 123.45,
"leg": 987.65,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"measureMethod": "SELECTION",
"status": "UNKNOWN"
}
}
}
shapeSelections
Response
Returns [ShapeSelection]!
Arguments
| Name | Description |
|---|---|
gender - Int!
|
Example
Query
query shapeSelections($gender: Int!) {
shapeSelections(gender: $gender) {
id
name
gender
part
shoulder
bust
waist
hip
}
}
Variables
{"gender": 987}
Response
{
"data": {
"shapeSelections": [
{
"id": ObjectId,
"name": "abc123",
"gender": 123,
"part": "TOP",
"shoulder": 987.65,
"bust": 987.65,
"waist": 123.45,
"hip": 123.45
}
]
}
}
tag
Example
Query
query tag($id: ObjectId!) {
tag(id: $id) {
id
name
createdAt
updatedAt
}
}
Variables
{"id": ObjectId}
Response
{
"data": {
"tag": {
"id": ObjectId,
"name": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
user
Example
Query
query user($id: ObjectId!) {
user(id: $id) {
id
name
gender
email
createdAt
updatedAt
}
}
Variables
{"id": ObjectId}
Response
{
"data": {
"user": {
"id": ObjectId,
"name": "xyz789",
"gender": 123,
"email": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
Mutations
assignTag
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
input - AssignTagInput!
|
Example
Query
mutation assignTag($input: AssignTagInput!) {
assignTag(input: $input) {
success
}
}
Variables
{"input": AssignTagInput}
Response
{"data": {"assignTag": {"success": false}}}
createBrand
Response
Returns a CreateBrandPayload!
Arguments
| Name | Description |
|---|---|
input - CreateBrandInput!
|
Example
Query
mutation createBrand($input: CreateBrandInput!) {
createBrand(input: $input) {
brand {
...BrandFragment
}
}
}
Variables
{"input": CreateBrandInput}
Response
{"data": {"createBrand": {"brand": Brand}}}
createContact
Response
Returns a CreateContactPayload!
Arguments
| Name | Description |
|---|---|
input - CreateContactInput!
|
Example
Query
mutation createContact($input: CreateContactInput!) {
createContact(input: $input) {
contact {
...ContactFragment
}
}
}
Variables
{"input": CreateContactInput}
Response
{"data": {"createContact": {"contact": Contact}}}
createFeedback
Response
Returns a CreateFeedbackPayload!
Arguments
| Name | Description |
|---|---|
input - CreateFeedbackInput!
|
Example
Query
mutation createFeedback($input: CreateFeedbackInput!) {
createFeedback(input: $input) {
feedback {
...FeedbackFragment
}
}
}
Variables
{"input": CreateFeedbackInput}
Response
{"data": {"createFeedback": {"feedback": Feedback}}}
createGarment
Response
Returns a CreateGarmentPayload!
Arguments
| Name | Description |
|---|---|
input - CreateGarmentInput!
|
Example
Query
mutation createGarment($input: CreateGarmentInput!) {
createGarment(input: $input) {
garment {
...GarmentFragment
}
}
}
Variables
{"input": CreateGarmentInput}
Response
{"data": {"createGarment": {"garment": Garment}}}
createGarment3d
Response
Returns a CreateGarment3dPayload!
Arguments
| Name | Description |
|---|---|
input - CreateGarment3dInput!
|
Example
Query
mutation createGarment3d($input: CreateGarment3dInput!) {
createGarment3d(input: $input) {
garment3d {
...Garment3DFragment
}
}
}
Variables
{"input": CreateGarment3dInput}
Response
{"data": {"createGarment3d": {"garment3d": Garment3D}}}
createHuman3d
Response
Returns a CreateHuman3dPayload!
Arguments
| Name | Description |
|---|---|
input - CreateHuman3dInput!
|
Example
Query
mutation createHuman3d($input: CreateHuman3dInput!) {
createHuman3d(input: $input) {
human3d {
...Human3DFragment
}
}
}
Variables
{"input": CreateHuman3dInput}
Response
{"data": {"createHuman3d": {"human3d": Human3D}}}
createShape
Response
Returns a CreateShapePayload!
Arguments
| Name | Description |
|---|---|
input - CreateShapeInput!
|
Example
Query
mutation createShape($input: CreateShapeInput!) {
createShape(input: $input) {
Shape {
...ShapeFragment
}
}
}
Variables
{"input": CreateShapeInput}
Response
{"data": {"createShape": {"Shape": Shape}}}
createShapeSelection
Response
Returns a CreateShapeSelectionPayload!
Arguments
| Name | Description |
|---|---|
input - CreateShapeSelectionInput!
|
Example
Query
mutation createShapeSelection($input: CreateShapeSelectionInput!) {
createShapeSelection(input: $input) {
ShapeSelection {
...ShapeSelectionFragment
}
}
}
Variables
{"input": CreateShapeSelectionInput}
Response
{
"data": {
"createShapeSelection": {
"ShapeSelection": ShapeSelection
}
}
}
createSize
Response
Returns a CreateSizePayload!
Arguments
| Name | Description |
|---|---|
input - CreateSizeInput!
|
Example
Query
mutation createSize($input: CreateSizeInput!) {
createSize(input: $input) {
size {
...SizeFragment
}
}
}
Variables
{"input": CreateSizeInput}
Response
{"data": {"createSize": {"size": Size}}}
createStyle
Response
Returns a CreateStylePayload!
Arguments
| Name | Description |
|---|---|
input - CreateStyleInput!
|
Example
Query
mutation createStyle($input: CreateStyleInput!) {
createStyle(input: $input) {
style {
...StyleFragment
}
}
}
Variables
{"input": CreateStyleInput}
Response
{"data": {"createStyle": {"style": Style}}}
createTag
Response
Returns a CreateTagPayload!
Arguments
| Name | Description |
|---|---|
input - CreateTagInput!
|
Example
Query
mutation createTag($input: CreateTagInput!) {
createTag(input: $input) {
tag {
...TagFragment
}
}
}
Variables
{"input": CreateTagInput}
Response
{"data": {"createTag": {"tag": Tag}}}
deleteBrand
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
Example
Query
mutation deleteBrand($id: ObjectId!) {
deleteBrand(id: $id) {
success
}
}
Variables
{"id": ObjectId}
Response
{"data": {"deleteBrand": {"success": true}}}
deleteGarment
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
Example
Query
mutation deleteGarment($id: ObjectId!) {
deleteGarment(id: $id) {
success
}
}
Variables
{"id": ObjectId}
Response
{"data": {"deleteGarment": {"success": false}}}
deleteGarment3d
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - String!
|
Example
Query
mutation deleteGarment3d($id: String!) {
deleteGarment3d(id: $id) {
success
}
}
Variables
{"id": "xyz789"}
Response
{"data": {"deleteGarment3d": {"success": false}}}
deleteHuman3d
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - String!
|
Example
Query
mutation deleteHuman3d($id: String!) {
deleteHuman3d(id: $id) {
success
}
}
Variables
{"id": "xyz789"}
Response
{"data": {"deleteHuman3d": {"success": false}}}
deleteShape
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
Example
Query
mutation deleteShape($id: ObjectId!) {
deleteShape(id: $id) {
success
}
}
Variables
{"id": ObjectId}
Response
{"data": {"deleteShape": {"success": false}}}
deleteShapeSelection
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
Example
Query
mutation deleteShapeSelection($id: ObjectId!) {
deleteShapeSelection(id: $id) {
success
}
}
Variables
{"id": ObjectId}
Response
{"data": {"deleteShapeSelection": {"success": false}}}
deleteSize
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
Example
Query
mutation deleteSize($id: ObjectId!) {
deleteSize(id: $id) {
success
}
}
Variables
{"id": ObjectId}
Response
{"data": {"deleteSize": {"success": true}}}
deleteStyle
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - ObjectId
|
Example
Query
mutation deleteStyle($id: ObjectId) {
deleteStyle(id: $id) {
success
}
}
Variables
{"id": ObjectId}
Response
{"data": {"deleteStyle": {"success": true}}}
deleteTag
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
Example
Query
mutation deleteTag($id: ObjectId!) {
deleteTag(id: $id) {
success
}
}
Variables
{"id": ObjectId}
Response
{"data": {"deleteTag": {"success": true}}}
deleteUser
Response
Returns a NoResponse!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
Example
Query
mutation deleteUser($id: ObjectId!) {
deleteUser(id: $id) {
success
}
}
Variables
{"id": ObjectId}
Response
{"data": {"deleteUser": {"success": false}}}
login
Response
Returns a LoginPayload!
Arguments
| Name | Description |
|---|---|
input - LoginInput!
|
Example
Query
mutation login($input: LoginInput!) {
login(input: $input) {
token
user {
...UserFragment
}
}
}
Variables
{"input": LoginInput}
Response
{
"data": {
"login": {
"token": "abc123",
"user": User
}
}
}
matchHuman3d
Description
Match human 3D model based on user's body measurements.
Example
Query
mutation matchHuman3d($userId: ObjectId!) {
matchHuman3d(userId: $userId) {
id
name
regularGarmentSize
gender
url
height
shoulder
bust
upperBust
underBust
arm
bodyLength
waist
hip
thigh
leg
createdAt
}
}
Variables
{"userId": ObjectId}
Response
{
"data": {
"matchHuman3d": {
"id": ObjectId,
"name": "xyz789",
"regularGarmentSize": "xyz789",
"gender": 123,
"url": "xyz789",
"height": 987.65,
"shoulder": 123.45,
"bust": 123.45,
"upperBust": 123.45,
"underBust": 123.45,
"arm": 987.65,
"bodyLength": 987.65,
"waist": 123.45,
"hip": 987.65,
"thigh": 123.45,
"leg": 123.45,
"createdAt": "2007-12-03T10:15:30Z"
}
}
}
updateBrand
Response
Returns a Brand!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
|
input - UpdateBrandInput!
|
Example
Query
mutation updateBrand(
$id: ObjectId!,
$input: UpdateBrandInput!
) {
updateBrand(
id: $id,
input: $input
) {
id
name
phone
email
website
logo {
...ImageFragment
}
membership
theme {
...ThemeFragment
}
contractStartedAt
contractEndedAt
createdAt
updatedAt
}
}
Variables
{
"id": ObjectId,
"input": UpdateBrandInput
}
Response
{
"data": {
"updateBrand": {
"id": ObjectId,
"name": "xyz789",
"phone": "abc123",
"email": "abc123",
"website": "abc123",
"logo": Image,
"membership": "PER_MONTH_30K",
"theme": Theme,
"contractStartedAt": "2007-12-03T10:15:30Z",
"contractEndedAt": "2007-12-03T10:15:30Z",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
updateGarment
Response
Returns an UpdateGarmentPayload!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
|
input - UpdateGarmentInput!
|
Example
Query
mutation updateGarment(
$id: ObjectId!,
$input: UpdateGarmentInput!
) {
updateGarment(
id: $id,
input: $input
) {
garment {
...GarmentFragment
}
}
}
Variables
{
"id": ObjectId,
"input": UpdateGarmentInput
}
Response
{"data": {"updateGarment": {"garment": Garment}}}
updateGarment3d
Response
Returns an UpdateGarment3dPayload!
Arguments
| Name | Description |
|---|---|
id - String!
|
|
input - UpdateGarment3dInput!
|
Example
Query
mutation updateGarment3d(
$id: String!,
$input: UpdateGarment3dInput!
) {
updateGarment3d(
id: $id,
input: $input
) {
garment3d {
...Garment3DFragment
}
}
}
Variables
{
"id": "xyz789",
"input": UpdateGarment3dInput
}
Response
{"data": {"updateGarment3d": {"garment3d": Garment3D}}}
updateHuman3d
Response
Returns an UpdateHuman3dPayload!
Arguments
| Name | Description |
|---|---|
id - String!
|
|
input - UpdateHuman3dInput!
|
Example
Query
mutation updateHuman3d(
$id: String!,
$input: UpdateHuman3dInput!
) {
updateHuman3d(
id: $id,
input: $input
) {
human3d {
...Human3DFragment
}
}
}
Variables
{
"id": "abc123",
"input": UpdateHuman3dInput
}
Response
{"data": {"updateHuman3d": {"human3d": Human3D}}}
updateShape
Response
Returns an UpdateShapePayload!
Arguments
| Name | Description |
|---|---|
input - UpdateShapeInput!
|
Example
Query
mutation updateShape($input: UpdateShapeInput!) {
updateShape(input: $input) {
Shape {
...ShapeFragment
}
}
}
Variables
{"input": UpdateShapeInput}
Response
{"data": {"updateShape": {"Shape": Shape}}}
updateSize
Response
Returns an UpdateSizePayload!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
|
input - UpdateSizeInput!
|
Example
Query
mutation updateSize(
$id: ObjectId!,
$input: UpdateSizeInput!
) {
updateSize(
id: $id,
input: $input
) {
size {
...SizeFragment
}
}
}
Variables
{
"id": ObjectId,
"input": UpdateSizeInput
}
Response
{"data": {"updateSize": {"size": Size}}}
updateStyle
Response
Returns an UpdateStylePayload!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
|
input - UpdateStyleInput!
|
Example
Query
mutation updateStyle(
$id: ObjectId!,
$input: UpdateStyleInput!
) {
updateStyle(
id: $id,
input: $input
) {
style {
...StyleFragment
}
}
}
Variables
{
"id": ObjectId,
"input": UpdateStyleInput
}
Response
{"data": {"updateStyle": {"style": Style}}}
updateTag
Response
Returns an UpdateTagPayload!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
|
input - UpdateTagInput!
|
Example
Query
mutation updateTag(
$id: ObjectId!,
$input: UpdateTagInput!
) {
updateTag(
id: $id,
input: $input
) {
tag {
...TagFragment
}
}
}
Variables
{
"id": ObjectId,
"input": UpdateTagInput
}
Response
{"data": {"updateTag": {"tag": Tag}}}
updateUser
Response
Returns an UpdateUserPayload!
Arguments
| Name | Description |
|---|---|
id - ObjectId!
|
|
input - UpdateUserInput!
|
Example
Query
mutation updateUser(
$id: ObjectId!,
$input: UpdateUserInput!
) {
updateUser(
id: $id,
input: $input
) {
user {
...UserFragment
}
}
}
Variables
{
"id": ObjectId,
"input": UpdateUserInput
}
Response
{"data": {"updateUser": {"user": User}}}
Types
AssignTagInput
AvailableImage
Fields
| Field Name | Description |
|---|---|
url - String!
|
|
variantStatus - ImageVariantStatus!
|
Example
{
"url": "xyz789",
"variantStatus": "QUEUING"
}
Boolean
Description
The Boolean scalar type represents true or false.
Example
{}
Brand
Example
{
"id": ObjectId,
"name": "xyz789",
"phone": "xyz789",
"email": "abc123",
"website": "xyz789",
"logo": Image,
"membership": "PER_MONTH_30K",
"theme": Theme,
"contractStartedAt": "2007-12-03T10:15:30Z",
"contractEndedAt": "2007-12-03T10:15:30Z",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
Company
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
{}
Contact
Example
{
"id": ObjectId,
"appellation": "xyz789",
"company": "abc123",
"jobTitle": "xyz789",
"email": "xyz789",
"content": "abc123",
"reason": "TRY_OUT",
"createdAt": "2007-12-03T10:15:30Z"
}
ContactReason
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
{}
CreateBrandInput
Fields
| Input Field | Description |
|---|---|
name - String!
|
|
phone - String!
|
|
email - String!
|
|
website - String!
|
|
logoId - ObjectId!
|
|
membership - Membership!
|
|
theme - ThemeInput
|
theme can be created during the brand creation, or updated later if not given, the default theme will be used |
contractStartedAt - DateTime!
|
|
contractEndedAt - DateTime!
|
Example
{}
CreateBrandPayload
Fields
| Field Name | Description |
|---|---|
brand - Brand!
|
Example
{"brand": Brand}
CreateContactInput
CreateContactPayload
Fields
| Field Name | Description |
|---|---|
contact - Contact!
|
Example
{"contact": Contact}
CreateFeedbackInput
Fields
| Input Field | Description |
|---|---|
userId - ObjectId!
|
|
reason - FeedbackReason!
|
|
note - String
|
Example
{}
CreateFeedbackPayload
Fields
| Field Name | Description |
|---|---|
feedback - Feedback!
|
Example
{"feedback": Feedback}
CreateGarment3dInput
CreateGarment3dPayload
Fields
| Field Name | Description |
|---|---|
garment3d - Garment3D!
|
Example
{"garment3d": Garment3D}
CreateGarmentInput
CreateGarmentPayload
Fields
| Field Name | Description |
|---|---|
garment - Garment!
|
Example
{"garment": Garment}
CreateHuman3dInput
CreateHuman3dPayload
Fields
| Field Name | Description |
|---|---|
human3d - Human3D!
|
Example
{"human3d": Human3D}
CreateShapeInput
Fields
| Input Field | Description |
|---|---|
userId - ObjectId!
|
|
height - Float!
|
|
gender - Int!
|
gender should be specify in all methods 1 represent male 0 represent female |
measureMethod - MeasureMethod!
|
|
frontImageId - ObjectId
|
frontImageId should be specify when measureMethod is IMAGE_AI |
sideImageId - ObjectId
|
sideImageId should be specify when measureMethod is IMAGE_AI |
topShapeSelectionId - ObjectId
|
topShapeSelectionId should be specify when measureMethod is SELECTION |
bottomShapeSelectionId - ObjectId
|
bottomShapeSelectionId should be specify when measureMethod is SELECTION |
shoulder - Float
|
shoulder can be specify when measureMethod is MANUAL_INPUT |
bust - Float
|
bust can be specify when measureMethod is MANUAL_INPUT |
upperBust - Float
|
upperBust can be specify when measureMethod is MANUAL_INPUT |
underBust - Float
|
underBust can be specify when measureMethod is MANUAL_INPUT |
arm - Float
|
arm can be specify when measureMethod is MANUAL_INPUT |
bodyLength - Float
|
bodyLength can be specify when measureMethod is MANUAL_INPUT |
waist - Float
|
waist can be specify when measureMethod is MANUAL_INPUT |
hip - Float
|
hip can be specify when measureMethod is MANUAL_INPUT |
thigh - Float
|
thigh can be specify when measureMethod is MANUAL_INPUT |
leg - Float
|
leg can be specify when measureMethod is MANUAL_INPUT |
Example
{}
CreateShapePayload
Fields
| Field Name | Description |
|---|---|
Shape - Shape!
|
Example
{"Shape": Shape}
CreateShapeSelectionInput
CreateShapeSelectionPayload
Fields
| Field Name | Description |
|---|---|
ShapeSelection - ShapeSelection!
|
Example
{"ShapeSelection": ShapeSelection}
CreateSizeInput
CreateSizePayload
Fields
| Field Name | Description |
|---|---|
size - Size!
|
Example
{"size": Size}
CreateStyleInput
CreateStylePayload
Fields
| Field Name | Description |
|---|---|
style - Style!
|
Example
{"style": Style}
CreateTagInput
CreateTagPayload
Fields
| Field Name | Description |
|---|---|
tag - Tag!
|
Example
{"tag": Tag}
DateTime
Example
{}
Feedback
Fields
| Field Name | Description |
|---|---|
id - ObjectId!
|
|
user - User!
|
|
reason - FeedbackReason!
|
|
note - String
|
|
createdAt - DateTime!
|
Example
{
"id": ObjectId,
"user": User,
"reason": "NOT_REALISTIC",
"note": "abc123",
"createdAt": "2007-12-03T10:15:30Z"
}
FeedbackReason
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
{}
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
{}
Garment
Fields
| Field Name | Description |
|---|---|
id - ObjectId!
|
|
name - String!
|
|
description - String!
|
|
brand - Brand!
|
|
siteUrl - String!
|
|
gender - Int!
|
|
cover - GarmentCover!
|
|
defaultPrice - Int!
|
|
sizes - [Size]!
|
|
styles - [Style]!
|
|
createdAt - DateTime!
|
|
updatedAt - DateTime!
|
|
predictedSize - PredictedSize!
|
predict the size for the user TODO: for oversize garment, we should return OVERSIZE instead of the predicted size |
Arguments
|
|
Example
{
"id": ObjectId,
"name": "abc123",
"description": "abc123",
"brand": Brand,
"siteUrl": "abc123",
"gender": 123,
"cover": "TOP",
"defaultPrice": 123,
"sizes": [Size],
"styles": [Style],
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"predictedSize": PredictedSize
}
Garment3D
Example
{
"id": ObjectId,
"modelId": ObjectId,
"styleId": ObjectId,
"referenceSizeId": ObjectId,
"url": "xyz789",
"createdAt": "2007-12-03T10:15:30Z"
}
GarmentCover
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
{}
GarmentMD
Human3D
Fields
| Field Name | Description |
|---|---|
id - ObjectId!
|
|
name - String!
|
|
regularGarmentSize - String!
|
|
gender - Int!
|
|
url - String!
|
|
height - Float!
|
|
shoulder - Float!
|
|
bust - Float
|
|
upperBust - Float
|
|
underBust - Float
|
|
arm - Float!
|
|
bodyLength - Float!
|
|
waist - Float!
|
|
hip - Float!
|
|
thigh - Float!
|
|
leg - Float!
|
|
createdAt - DateTime!
|
Example
{
"id": ObjectId,
"name": "xyz789",
"regularGarmentSize": "abc123",
"gender": 123,
"url": "abc123",
"height": 123.45,
"shoulder": 987.65,
"bust": 987.65,
"upperBust": 123.45,
"underBust": 987.65,
"arm": 123.45,
"bodyLength": 123.45,
"waist": 123.45,
"hip": 123.45,
"thigh": 123.45,
"leg": 987.65,
"createdAt": "2007-12-03T10:15:30Z"
}
Human3dSource
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
{}
Image
Fields
| Field Name | Description |
|---|---|
id - ObjectId!
|
|
originalUrl - String!
|
|
variant - AvailableImage!
|
|
Arguments |
|
createdAt - DateTime!
|
|
updatedAt - DateTime!
|
|
Example
{
"id": ObjectId,
"originalUrl": "abc123",
"variant": AvailableImage,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
ImageFormat
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Example
{}
ImageResizingType
Values
| Enum Value | Description |
|---|---|
|
|
This is fully based on imgproxy resizing type. |
|
|
Example
{}
ImageVariantStatus
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
{}
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
{}
LoginInput
LoginPayload
MeasureMethod
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
{}
Membership
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Example
{}
Model3ds
Fields
| Field Name | Description |
|---|---|
garmentUrls - [String!]!
|
|
human3d - Human3D!
|
|
human3dSource - Human3dSource!
|
Example
{
"garmentUrls": ["xyz789"],
"human3d": Human3D,
"human3dSource": "DEFAULT"
}
NoResponse
Fields
| Field Name | Description |
|---|---|
success - Boolean!
|
Example
{"success": true}
ObjectId
Example
{}
PredictedSize
Example
{
"sizeName": "abc123",
"shoulderDiff": 123.45,
"bustDiff": 987.65,
"armDiff": 123.45,
"bodyLengthDiff": 123.45,
"waistDiff": 987.65,
"hipDiff": 123.45,
"legDiff": 123.45,
"thighDiff": 123.45
}
Role
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
{}
Shape
Fields
| Field Name | Description |
|---|---|
id - ObjectId!
|
|
height - Float!
|
|
shoulder - Float
|
|
bust - Float
|
|
upperBust - Float
|
|
underBust - Float
|
|
arm - Float
|
|
bodyLength - Float
|
|
waist - Float
|
|
hip - Float
|
|
thigh - Float
|
|
leg - Float
|
|
createdAt - DateTime!
|
|
updatedAt - DateTime!
|
|
measureMethod - MeasureMethod!
|
|
status - ShapeStatus!
|
Example
{
"id": ObjectId,
"height": 123.45,
"shoulder": 123.45,
"bust": 987.65,
"upperBust": 123.45,
"underBust": 987.65,
"arm": 123.45,
"bodyLength": 987.65,
"waist": 987.65,
"hip": 123.45,
"thigh": 123.45,
"leg": 987.65,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"measureMethod": "SELECTION",
"status": "UNKNOWN"
}
ShapeSelection
ShapeSelectionPart
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
{}
ShapeStatus
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Example
{}
Size
Example
{
"id": ObjectId,
"name": "abc123",
"shoulder": 987.65,
"bust": 123.45,
"upperBust": 987.65,
"underBust": 987.65,
"arm": 123.45,
"bodyLength": 987.65,
"waist": 123.45,
"hip": 987.65,
"thigh": 987.65,
"leg": 123.45
}
String
Description
The Stringscalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
{}
Style
Example
{
"id": ObjectId,
"name": "abc123",
"garmentImage": Image,
"fabricImage": Image,
"price": 123,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z"
}
Tag
Theme
ThemeInput
UpdateBrandInput
Fields
| Input Field | Description |
|---|---|
name - String
|
|
phone - String
|
|
email - String
|
|
website - String
|
|
logoId - ObjectId
|
|
membership - Membership
|
|
theme - ThemeInput
|
|
contractStartedAt - DateTime
|
|
contractEndedAt - DateTime
|
Example
{}
UpdateGarment3dInput
UpdateGarment3dPayload
Fields
| Field Name | Description |
|---|---|
garment3d - Garment3D!
|
Example
{"garment3d": Garment3D}
UpdateGarmentInput
Fields
| Input Field | Description |
|---|---|
name - String
|
|
siteUrl - String
|
|
gender - Int
|
|
cover - GarmentCover
|
|
defaultPrice - Int
|
Example
{}
UpdateGarmentPayload
Fields
| Field Name | Description |
|---|---|
garment - Garment!
|
Example
{"garment": Garment}
UpdateHuman3dInput
UpdateHuman3dPayload
Fields
| Field Name | Description |
|---|---|
human3d - Human3D!
|
Example
{"human3d": Human3D}
UpdateShapeInput
UpdateShapePayload
Fields
| Field Name | Description |
|---|---|
Shape - Shape!
|
Example
{"Shape": Shape}
UpdateSizeInput
UpdateSizePayload
Fields
| Field Name | Description |
|---|---|
size - Size!
|
Example
{"size": Size}
UpdateStyleInput
UpdateStylePayload
Fields
| Field Name | Description |
|---|---|
style - Style!
|
Example
{"style": Style}
UpdateTagInput
Fields
| Input Field | Description |
|---|---|
name - String
|
Example
{}
UpdateTagPayload
Fields
| Field Name | Description |
|---|---|
tag - Tag!
|
Example
{"tag": Tag}
UpdateUserInput
UpdateUserPayload
Fields
| Field Name | Description |
|---|---|
user - User!
|
Example
{"user": User}