Add Supplement

Use createSupplement to add new supplements available to the users.

Required Arguments

ArgumentTypeDescription

brand

String!

Supplement brand.

name

String!

Supplement name.

servingName

String!

Supplement serving name ex: Capsule, scoop, etc.

category

String!

Supplement category.

directionsOfUse

[DirectionsOfUseInput!]

directionsOfUse.timeOfDay

TimeOfDay!

enum TimeOfDay { AT_BEDTIME AT_WAKING WITH_BREAKFAST WITH_DINNER WITH_LUNCH }

directionsOfUse.quantity

Float!

Recommended dosage.

mainImage

String!

Main image URL.

description

String

Supplement description.

directionsOfUseText

String

Recommended use instructions.

externalId

String

External Id.

images

[String]

Supplement images.

ingredients

String

Supplement ingredients.

instructions

String

Supplement instructions.

shopifyParentId

String

Shopify parent Id.

shopifyVariantId

String

Shopify variant Id.

sizeCount

Int

Supplement size.

sku

String

SKU

storeId

String

Store Id.

supplementFacts

String

Supplement Facts.

productUrl

String

URL of the supplement.

Example

mutation($input: CreateSupplementInput!) {
            createSupplement(input: $input) {
                success message
                supplement {
                    name category mainImage brand servingName description
                    directionsOfUseText sizeCount externalId sku storeId
                    shopifyVariantId shopifyParentId instructions ingredients 
                    supplementFacts images 
                    directionsOfUse { id quantity timeOfDay }
                }
            }
        }

Query Input Variables

{
	"input": {
		"name": "SuppTest",
		"brand": "ACME",
		"category": "Generic",
		"servingName": "Capsule",
		"mainImage": "https://static.wikia.nocookie.net/warner-bros-entertainment/images/6/6e/Acme-corp.png/revision/latest?cb=20180619032346",
		"directionsOfUse": [{
			"timeOfDay": "WITH_BREAKFAST",
			"quantity": 2
		}]
	}
}

Last updated