@prg/gatsby-source-something-whatever
Version:
something something whatever who gives a crap.
67 lines (60 loc) • 2.1 kB
JavaScript
// TODO go back through and re-non-null stuff
// TODO figure out how to link up contentful products and platform products with @link
export const typeDefs = `
type WhateverImage implements Node {
src: String
altText: String
position: Int
product: WhateverProduct (by: "id", from: "product___NODE")
variants: [WhateverProductVariant] (by: "id", from: "variants___NODE")
localFile: File
}
type WhateverVideo implements Node {
src: String
}
type WhateverProductOptionValue implements Node {
title: String
productOptionId: String
position: Int
option: WhateverProductOption
}
type WhateverProductOption implements Node {
title: String
productId: String
position: Int
product: WhateverProduct (by: "id", from: "product___NODE")
values: [WhateverProductOptionValue]
}
type WhateverProductVariant implements Node {
title: String
available: Boolean
inventory: Int
foreignId: String
productForeignId: String
foreignProductHandle: String
foreignProductPublishedAt: Date
price: Int
compareAtPrice: Int
product: WhateverProduct (by: "id", from: "product___NODE")
productId: String
images: [WhateverImage] (by: "id", from: "images___NODE")
image: WhateverImage (by: "id", from: "image___NODE")
hoverImage: WhateverImage
selectedOptions: JSON
metadata: JSON
}
type WhateverProduct implements Node {
available: Boolean
title: String
handle: String
description: String
type: String
foreignIds: [String]
metadata: JSON
featuredImage: WhateverImage
images: [WhateverImage]
options: [WhateverProductOption] (by: "id", from: "options___NODE")
optionValues: JSON
variants: [WhateverProductVariant]
}
`;