# Objects

This guide is a quick reference of objects found in a Nacelle project. However, the most verbose and up to date information on objects can be found in our GraphQL documentation.

To view our GraphQL documentation use a GraphQL tool like Insomnia or GraphiQL. In either client, first enter your space API URL as a POST. Next, add a header with key x-nacelle-token and value equal to your space's token. Both of these values can be found in your dashboard under settings section of your space.

For instructions on how to load objects into a custom component, please see the documentation on loading Nacelle data into your Nuxt project section.

# Examples

You will find the syntax below similar to Shopify's Liquid. Our first example will output the title of a product:

{{product.title}}

The next example will output the featured media associated with a product variant. Here, featured media could represent an image, an AR object or, a video:

{{product.variants[0].featuredMedia.src}}

The last example is related to Nacelle's shoppable content feature. This will output the description of the first product found in an article:

{{article.products[0].description}}

# NOTE: Product Metafields on Shopify

If you are using product metafields in Shopify, you will have to expose the metafields via Shopify's Admin GraphQL. If you skip this step, you will not be able to access product Metafields in Nacelle. Shopify's documentation for this process can be found here: Shopify GraphQL Metafields.

To simplify this, we recommend you use the Shopify GraphQL Admin App. Be sure to give the app PRODUCT permissions then follow Shopify's Metafield Store Front Visibility Create instructions.

# Product

id: ID!
handle: String!
locale: String!
globalHandle: String!
pimSyncSourceDomain: String!
pimSyncSource: String
pimSyncSourceProductId: String
title: String
description: String
priceRange: PriceRange
productType: String
featuredMedia: Media
availableForSale: Boolean!
vendor: String
tags: [String!]
media: [Media!]
metafields: [Metafield!]
variants: [Variant!]
createdAt: Int
updatedAt: Int
indexedAt: Int!

# Variant

id: ID!
title: String
price: String
priceCurrency: String
compareAtPrice: String
compareAtPriceCurrency: String
selectedOptions: [SelectedOption!]
featuredMedia: Media
sku: String
availableForSale: Boolean
weight: String
weightUnit: String

# Media

id: ID
type: String!
src: String!
thumbnailSrc: String!
altText: String

# Collection

id: ID!
handle: String!
locale: String!
globalHandle: String!
pimSyncSourceDomain: String!
pimSyncSource: String
pimSyncSourceCollectionId: String
title: String
description: String
featuredMedia: Media
productLists: [ProductList!]
createdAt: Int
updatedAt: Int

# ProductList

title: String!
slug: String!
locale: String
handles: [String!]

# Content

id: ID!
handle: String!
locale: String!
globalHandle: String!
cmsSyncSource: String!
cmsSyncSourceDomain: String!
cmsSyncSourceContentId: String
type: String!
title: String
description: String
sections: JSON
tags: [String!]
fields: JSON
articleLists: [ArticleList!]
collectionHandle: String
content: String
contentHtml: String
excerpt: String
blogHandle: String
featuredMedia: Media
author: Author
publishDate: Int
createdAt: Int
updatedAt: Int
indexedAt: Int!

# ArticleList

title: String!
slug: String!
locale: String
handles: [String!]

# Blog

id: ID!
handle: String!
locale: String!
globalHandle: String!
cmsSyncSource: String!
cmsSyncSourceDomain: String!
cmsSyncSourceContentId: String
type: String!
title: String
description: String
sections: JSON
tags: [String!]
fields: JSON
articleLists: [ArticleList!]
collectionHandle: String
content: String
contentHtml: String
excerpt: String
blogHandle: String
featuredMedia: Media
author: Author
publishDate: Int
createdAt: Int
updatedAt: Int
indexedAt: Int!

# Article

id: ID!
handle: String!
locale: String!
globalHandle: String!
cmsSyncSource: String!
cmsSyncSourceDomain: String!
cmsSyncSourceContentId: String
type: String!
title: String
description: String
sections: JSON
tags: [String!]
fields: JSON
articleLists: [ArticleList!]
relatedArticles: [RelatedArticle!]
collectionHandle: String
content: String
contentHtml: String
excerpt: String
blogHandle: String
featuredMedia: Media
author: Author
publishDate: Int
createdAt: Int
updatedAt: Int
indexedAt: Int!

# Author

firstName: String
lastName: String
bio: String
email: String

# RelatedArticle

handle: String!
title: String
blogHandle: String
cmsSyncSourceContentId: String
locale: String!
createdAt: Int
updatedAt: Int
description: String
excerpt: String
tags: [String!]
author: Author
featuredMedia: Media
publishDate: Int