-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
246 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type StoreAggregateOffer { | ||
# Highest spot price amongst all sellers | ||
highPrice: Float! | ||
# Lowest spot price amongst all sellers | ||
lowPrice: Float! | ||
# Number of sellers selling this sku | ||
offerCount: Int! | ||
priceCurrency: String! | ||
offers: [StoreOffer!]! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type StoreAggregateRating { | ||
ratingValue: Float! | ||
reviewCount: Int! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type StoreAuthor { | ||
name: String! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type StoreBrand { | ||
name: String! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type StoreListItem { | ||
item: String! | ||
name: String! | ||
position: Int! | ||
} | ||
|
||
type StoreBreadcrumbList { | ||
itemListElement: [StoreListItem!]! | ||
numberOfItems: Int! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
enum StoreCollectionType { | ||
Department | ||
Category | ||
Brand | ||
Cluster | ||
} | ||
|
||
type StoreCollectionFacet { | ||
key: String! | ||
value: String! | ||
} | ||
|
||
type StoreCollectionMeta { | ||
selectedFacets: [StoreCollectionFacet!]! | ||
} | ||
|
||
type StoreCollection { | ||
# Meta tag data | ||
seo: StoreSeo! | ||
# location for structured data | ||
breadcrumbList: StoreBreadcrumbList! | ||
meta: StoreCollectionMeta! | ||
id: ID! | ||
slug: String! | ||
type: StoreCollectionType! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type StoreFacet { | ||
key: String! | ||
label: String! | ||
values: [StoreFacetValue!]! | ||
type: StoreFacetType! | ||
} | ||
|
||
type StoreFacetValue { | ||
value: String! | ||
label: String! | ||
selected: Boolean! | ||
# Number of items with this facet | ||
quantity: Int! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type StoreImage { | ||
url: String! | ||
alternateName: String! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { print } from 'graphql' | ||
|
||
import AggregateOffer from './aggregateOffer.graphql' | ||
import AggregateRating from './aggregateRating.graphql' | ||
import Author from './author.graphql' | ||
import Brand from './brand.graphql' | ||
import Breadcrumb from './breadcrumb.graphql' | ||
import Collection from './collection.graphql' | ||
import Facet from './facet.graphql' | ||
import Image from './image.graphql' | ||
import Offer from './offer.graphql' | ||
import Organization from './organization.graphql' | ||
import PageInfo from './pageInfo.graphql' | ||
import Product from './product.graphql' | ||
import ProductGroup from './productGroup.graphql' | ||
import Query from './query.graphql' | ||
import Review from './review.graphql' | ||
import Seo from './seo.graphql' | ||
|
||
export const typeDefs = [ | ||
Query, | ||
Brand, | ||
Breadcrumb, | ||
Collection, | ||
Facet, | ||
Image, | ||
PageInfo, | ||
Product, | ||
Seo, | ||
Offer, | ||
AggregateRating, | ||
Review, | ||
Author, | ||
ProductGroup, | ||
Organization, | ||
AggregateOffer, | ||
] | ||
.map(print) | ||
.join('\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
type StoreOffer { | ||
listPrice: Float! | ||
sellingPrice: Float! | ||
priceCurrency: String! | ||
# Also known as spotPrice | ||
price: Float! | ||
priceValidUntil: String! | ||
itemCondition: String! | ||
availability: String! | ||
seller: StoreOrganization! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type StoreOrganization { | ||
identifier: String! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type StorePageInfo { | ||
hasNextPage: Boolean! | ||
hasPreviousPage: Boolean! | ||
startCursor: String! | ||
endCursor: String! | ||
# Total number of items, not pages | ||
totalCount: Int! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
type StoreProduct { | ||
# Meta tag data | ||
seo: StoreSeo! | ||
# location for structured data | ||
breadcrumbList: StoreBreadcrumbList! | ||
# Where to retrieve this entity | ||
slug: String! | ||
name: String! | ||
productID: String! | ||
brand: StoreBrand! | ||
description: String! | ||
image: [StoreImage!]! | ||
offers: StoreAggregateOffer! | ||
sku: String! | ||
gtin: String! | ||
review: [StoreReview!]! | ||
aggregateRating: StoreAggregateRating! | ||
isVariantOf: StoreProductGroup! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type StoreProductGroup { | ||
hasVariant: [StoreProduct!]! | ||
productGroupID: String! | ||
name: String! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
type StoreProductEdge { | ||
node: StoreProduct! | ||
cursor: String! | ||
} | ||
|
||
type StoreProductConnection { | ||
pageInfo: StorePageInfo! | ||
edges: [StoreProductEdge!]! | ||
} | ||
|
||
|
||
type StoreCollectionEdge { | ||
node: StoreCollection! | ||
cursor: String! | ||
} | ||
|
||
type StoreCollectionConnection { | ||
pageInfo: StorePageInfo! | ||
edges: [StoreCollectionEdge!]! | ||
} | ||
|
||
enum StoreProductIDField { | ||
id | ||
slug | ||
} | ||
|
||
input StoreProductID { | ||
field: StoreProductIDField! | ||
value: ID! | ||
} | ||
|
||
enum StoreSort { | ||
price_desc | ||
price_asc | ||
orders_desc | ||
name_desc | ||
name_asc | ||
release_desc | ||
discount_desc | ||
score_desc | ||
} | ||
|
||
input StoreSelectedFacet { | ||
key: String! | ||
value: String! | ||
} | ||
|
||
enum StoreFacetType { | ||
BOOLEAN | ||
RANGE | ||
} | ||
|
||
type StoreSearchResult { | ||
products: StoreProductConnection! | ||
facets: [StoreFacet!]! | ||
} | ||
|
||
type Query { | ||
product(locator: StoreProductID!): StoreProduct! | ||
|
||
search( | ||
first: Int! | ||
after: String | ||
sort: StoreSort = score_desc | ||
term: String = "" | ||
selectedFacets: [StoreSelectedFacet!] | ||
): StoreSearchResult! | ||
|
||
allProducts(first: Int!, after: String): StoreProductConnection! | ||
|
||
allCollections(first: Int!, after: String): StoreCollectionConnection! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type StoreReviewRating { | ||
ratingValue: Float! | ||
bestRating: Float! | ||
} | ||
|
||
type StoreReview { | ||
reviewRating: StoreReviewRating! | ||
author: StoreAuthor! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type StoreSeo { | ||
title: String! | ||
titleTemplate: String! | ||
description: String! | ||
canonical: String! | ||
} |