UNPKG

@prg/gatsby-source-something-whatever

Version:

something something whatever who gives a crap.

67 lines (60 loc) 2.1 kB
// 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 @link (by: "id", from: "product___NODE") variants: [WhateverProductVariant] @link (by: "id", from: "variants___NODE") localFile: File @link(by: "id", from: "localFile___NODE") } type WhateverVideo implements Node { src: String } type WhateverProductOptionValue implements Node { title: String productOptionId: String position: Int option: WhateverProductOption @link(by: "platformId", from: "productOptionId") } type WhateverProductOption implements Node { title: String productId: String position: Int product: WhateverProduct @link (by: "id", from: "product___NODE") values: [WhateverProductOptionValue] @link } type WhateverProductVariant implements Node { title: String available: Boolean inventory: Int foreignId: String productForeignId: String foreignProductHandle: String foreignProductPublishedAt: Date price: Int compareAtPrice: Int product: WhateverProduct @link (by: "id", from: "product___NODE") productId: String images: [WhateverImage] @link (by: "id", from: "images___NODE") image: WhateverImage @link (by: "id", from: "image___NODE") hoverImage: WhateverImage @link(by: "id", from: "hoverImage___NODE") selectedOptions: JSON metadata: JSON } type WhateverProduct implements Node { available: Boolean title: String handle: String description: String type: String foreignIds: [String] metadata: JSON featuredImage: WhateverImage @link(by: "id", from: "featuredImage___NODE") images: [WhateverImage] @link(by: "id", from: "images___NODE") options: [WhateverProductOption] @link (by: "id", from: "options___NODE") optionValues: JSON variants: [WhateverProductVariant] @link(by: "id", from: "variants___NODE") } `;