### Example Variables for GraphQL Product Search Query Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Provides an example JSON object demonstrating the structure and typical values for variables used with the `ProductSearch` GraphQL query. It includes placeholders and example values for various search parameters like `query`, `selectedFacets`, `orderBy`, and pagination. ```JSON { "query": "", "fullText": "", "map": "", "selectedFacets": [SelectedFacetInput], "category": "", "specificationFilters": ["xyz789"], "priceRange": "", "collection": "", "salesChannel": "", "orderBy": "OrderByScoreDESC", "from": 0, "to": 9, "hideUnavailableItems": false, "simulationBehavior": "default", "productOriginVtex": false, "operator": "and", "fuzzy": "abc123", "searchState": "abc123", "options": Options } ``` -------------------------------- ### GraphQL Query Example for Search Suggestions Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Illustrates the usage of the `searchSuggestions` GraphQL query to get suggested search terms based on a provided `fullText` input. The query returns a list of search suggestions. ```GraphQL query SearchSuggestions($fullText: String!) { searchSuggestions(fullText: $fullText) { searches { ...SearchSuggestionFragment } } } ``` ```JSON {"fullText": "xyz789"} ``` -------------------------------- ### Product-like Object Example Structure Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html An example JSON structure representing a product or a similar entity, detailing various fields and their potential types or values. ```APIDOC { "brand": "abc123", "categoryId": "4", "categoryTree": [Category], "clusterHighlights": [ClusterHighlight], "productClusters": [ProductClusters], "description": "xyz789", "link": "xyz789", "linkText": "abc123", "productId": "4", "productName": "abc123", "properties": [Property], "propertyGroups": [PropertyGroup], "productReference": "xyz789", "recommendations": Recommendation, "jsonSpecifications": "xyz789" } ``` -------------------------------- ### Options Input Type Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines input fields for search options, such as allowing redirects, and provides an example of how to set these options. ```APIDOC Input Fields: `allowRedirect` - `Boolean`: If the search has a redirect enabled, this allows (`true`) or not (`false`) the redirect to be used. Example: {"allowRedirect": true} ``` -------------------------------- ### Product Object Example Structure Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Illustrates the comprehensive structure of a product object, detailing various fields such as brand, categories, items, and pricing information. This example represents a typical product data payload. ```JSON { "brand": "abc123", "brandId": 987, "cacheId": "4", "categoryId": 4, "categories": ["abc123"], "categoryTree": [Category], "clusterHighlights": [ClusterHighlight], "productClusters": [ProductClusters], "description": "xyz789", "items": [SKU], "skuSpecifications": [SkuSpecification], "link": "abc123", "linkText": "abc123", "productId": "4", "productName": "abc123", "properties": [Property], "propertyGroups": [PropertyGroup], "productReference": "xyz789", "titleTag": "xyz789", "metaTagDescription": "xyz789", "recommendations": Recommendation, "jsonSpecifications": "xyz789", "benefits": [Benefit], "itemMetadata": ItemMetadata, "specificationGroups": [SpecificationGroup], "priceRange": ProductPriceRange, "releaseDate": "xyz789", "selectedProperties": [SelectedProperty] } ``` -------------------------------- ### Example Variables for Products GraphQL Query Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Provides an example JSON structure for the variables used with the `Products` GraphQL query. This demonstrates how to pass parameters such as search query, category, specification filters, price range, sales channel, ordering, and pagination details. ```JSON { "query": "", "map": "", "category": "", "specificationFilters": ["xyz789"], "priceRange": "", "collection": "", "salesChannel": "", "orderBy": "OrderByScoreDESC", "from": 0, "to": 9, "hideUnavailableItems": false, "simulationBehavior": "default" } ``` -------------------------------- ### ProductSuggestions API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the structure for product suggestions, including the count of suggested products, the products themselves, and indicators for misspelling and search operator. Provides an example JSON structure for ProductSuggestions. ```APIDOC ProductSuggestions: count: Int! - Number of suggested products products: [Product]! - Suggested products misspelled: Boolean - If the term is misspelled or not operator: Operator - Indicates how the search-engine will deal with the fullText if there is more than one word. Set `and` if the returned products must have all the words in its metadata or `or` otherwise. ``` ```JSON { "count": 987, "products": [Product], "misspelled": true, "operator": "and" } ``` -------------------------------- ### SelectedProperty API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Describes a selected property with its key and value, along with an example JSON structure. ```APIDOC SelectedProperty: key: String value: String ``` ```json { "key": "xyz789", "value": "xyz789" } ``` -------------------------------- ### Example GraphQL query for product data Source: https://github.com/vtex-apps/search-graphql/blob/master/docs/README.md This GraphQL query demonstrates how to fetch product data by slug using the `vtex.search-graphql` provider. It retrieves the product name for a given slug. ```graphql query ProductQuery($slug: String) { product(identifier: { field: slug, value: $slug}) @context(provider: "vtex.search-graphql") { productName } } ``` -------------------------------- ### Installment Object Type Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the Installment object type, detailing the properties of a single installment payment, including its value, interest rate, total value, number of installments, and payment system names. ```APIDOC Installment: Fields: - Value: Float - InterestRate: Float - TotalValuePlusInterestRate: Float - NumberOfInstallments: Int - PaymentSystemName: String - PaymentSystemGroupName: String - Name: String ``` ```JSON { "Value": 123.45, "InterestRate": 123.45, "TotalValuePlusInterestRate": 123.45, "NumberOfInstallments": 123, "PaymentSystemName": "abc123", "PaymentSystemGroupName": "abc123", "Name": "xyz789" } ``` -------------------------------- ### SearchSuggestions API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Describes the SearchSuggestions object, which contains a list of individual search suggestions, along with an example JSON structure. ```APIDOC SearchSuggestions: searches: [SearchSuggestion] - A list of search suggestions. ``` ```json {"searches": [SearchSuggestion]} ``` -------------------------------- ### SearchMetadata API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines metadata fields for search results, such as titleTag and metaTagDescription, with an accompanying JSON example. ```APIDOC SearchMetadata: titleTag: String metaTagDescription: String ``` ```json { "titleTag": "abc123", "metaTagDescription": "abc123" } ``` -------------------------------- ### Discount Object Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the structure of a Discount object, which primarily contains its name. The example shows a simple JSON representation of a discount. ```APIDOC Discount: name: String ``` ```JSON {"name": "abc123"} ``` -------------------------------- ### SelectedFacet API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Describes a selected facet with its key and value, along with an example JSON structure. ```APIDOC SelectedFacet: key: String value: String ``` ```json { "key": "xyz789", "value": "xyz789" } ``` -------------------------------- ### Example GraphQL Query for Top Searches Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html An illustrative GraphQL query to fetch the top 10 most searched terms. This example demonstrates how to retrieve search suggestions using a fragment. ```GraphQL query TopSearches { topSearches { searches { ...SearchSuggestionFragment } } } ``` -------------------------------- ### Example JSON for AssemblyOptionInput Type Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html A sample JSON object representing an instance of the `AssemblyOptionInput` GraphQL type. It illustrates typical values for its fields, including nested `AssemblyOptionInput` objects. ```JSON { "id": 4, "quantity": 123, "assemblyId": "abc123", "seller": "xyz789", "options": [AssemblyOptionInput] } ``` -------------------------------- ### SearchURLStats API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the structure for search URL statistics, including the path and count, with an example JSON representation. ```APIDOC SearchURLStats: path: String! count: Int! ``` ```json {"path": "xyz789", "count": 987} ``` -------------------------------- ### SearchSuggestion API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Describes a search suggestion object, including the search term, its count, and a list of associated attributes, along with an example JSON structure. ```APIDOC SearchSuggestion: term: String! - Search term. count: Int! - Number of times the term was searched. attributes: [SearchSuggestionAttribute] - List of facets in which the term can be searched. ``` ```json { "term": "xyz789", "count": 123, "attributes": [SearchSuggestionAttribute] } ``` -------------------------------- ### PriceTableItem Type Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the structure for an item in a price table, including ID, assembly ID, and price, along with an example. ```APIDOC Fields: `id` - `String` `assemblyId` - `String` `price` - `Int` Example: { "id": "abc123", "assemblyId": "abc123", "price": 123 } ``` -------------------------------- ### Example Response for Products GraphQL Query Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Illustrates the expected JSON structure of the response from the `Products` GraphQL query. It shows the various fields returned for a product, including nested objects for categories, items, specifications, and pricing, providing a clear understanding of the data shape. ```JSON { "data": { "products": { "brand": "xyz789", "brandId": 123, "cacheId": 4, "categoryId": "4", "categories": ["abc123"], "categoryTree": [Category], "clusterHighlights": [ClusterHighlight], "productClusters": [ProductClusters], "description": "abc123", "items": [SKU], "skuSpecifications": [SkuSpecification], "link": "xyz789", "linkText": "xyz789", "productId": "4", "productName": "abc123", "properties": [Property], "propertyGroups": [PropertyGroup], "productReference": "abc123", "titleTag": "abc123", "metaTagDescription": "abc123", "recommendations": Recommendation, "jsonSpecifications": "xyz789", "benefits": [Benefit], "itemMetadata": ItemMetadata, "specificationGroups": [SpecificationGroup], "priceRange": ProductPriceRange, "releaseDate": "xyz789", "selectedProperties": [SelectedProperty] } } } ``` -------------------------------- ### Installment API Definition Source: https://github.com/vtex-apps/search-graphql/blob/master/docs/README.md Defines the structure for an Installment object, detailing financial information related to payment installments, including value, interest rates, total value, number of installments, and payment system names. ```APIDOC Installment: Value: Float InterestRate: Float TotalValuePlusInterestRate: Float NumberOfInstallments: Int PaymentSystemName: String PaymentSystemGroupName: String Name: String ``` -------------------------------- ### Example JSON for BenefitItem Type Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html A sample JSON object representing an instance of the `BenefitItem` GraphQL type. It illustrates typical values for its fields, including a product reference, SKU IDs, discount, and minimum quantity. ```JSON { "benefitProduct": Product, "benefitSKUIds": ["abc123"], "discount": 987.65, "minQuantity": 987 } ``` -------------------------------- ### Generic JSON Object Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html An example of a generic JSON object structure, possibly representing a search result item or a similar entity. ```json { "id": "abc123", "name": "xyz789", "area": "xyz789", "html": "xyz789" } ``` -------------------------------- ### ProductClusters API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the structure for product clusters, including their unique identifier and name. Provides an example JSON representation of a ProductCluster object. ```APIDOC ProductClusters: id: ID name: String ``` ```JSON {"id": 4, "name": "xyz789"} ``` -------------------------------- ### Example GraphQL Query for Search URLs Count Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Illustrative GraphQL query to fetch search URL access counts. This example demonstrates how to use the `limit` and `sort` variables to control the query's output. ```GraphQL query SearchURLsCount( $limit: Int, $sort: SORT ) { searchURLsCount( limit: $limit, sort: $sort ) { path count } } ``` -------------------------------- ### SearchSuggestionAttribute API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the structure for a search suggestion attribute, including its key, value, and human-readable label, with an example JSON representation. ```APIDOC SearchSuggestionAttribute: key: String! - Facet key. value: String! - Facet value. labelValue: String! - Human-readable format of the facet key. ``` ```json { "key": "xyz789", "value": "abc123", "labelValue": "abc123" } ``` -------------------------------- ### APIDOC: CompositionItem Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the structure for an item within a product composition, including quantity constraints and pricing details. ```APIDOC CompositionItem: id: ID minQuantity: Int maxQuantity: Int initialQuantity: Int priceTable: String seller: String ``` ```JSON { "id": 4, "minQuantity": 123, "maxQuantity": 987, "initialQuantity": 123, "priceTable": "xyz789", "seller": "abc123" } ``` -------------------------------- ### Seller API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the structure for a seller, including seller ID, name, add-to-cart link, default status, and commercial offer, with an example JSON representation. ```APIDOC Seller: sellerId: ID sellerName: String addToCartLink: String sellerDefault: Boolean commertialOffer: Offer ``` ```json { "sellerId": "4", "sellerName": "abc123", "addToCartLink": "xyz789", "sellerDefault": false, "commertialOffer": Offer } ``` -------------------------------- ### JSON Response for Product Suggestions Query Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Example JSON response structure returned by the `ProductSuggestions` GraphQL query. It illustrates the format of the data, including the total count of suggestions, a list of products, and flags for misspelling or operator usage. ```JSON { "data": { "productSuggestions": { "count": 987, "products": [Product], "misspelled": false, "operator": "and" } } } ``` -------------------------------- ### ProductPriceRange API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Defines the price range structure for products, including selling and list prices, both referencing the PriceRange type. Includes an example JSON structure for ProductPriceRange. ```APIDOC ProductPriceRange: sellingPrice: PriceRange listPrice: PriceRange ``` ```JSON { "sellingPrice": PriceRange, "listPrice": PriceRange } ``` -------------------------------- ### ProductSearch API Definition and Example Source: https://github.com/vtex-apps/search-graphql/blob/master/spectaql-documentation/index.html Describes the ProductSearch object, which encapsulates search results including products, total records, SEO metadata, breadcrumbs, and search correction/suggestion details. Provides an example JSON structure for a ProductSearch response. ```APIDOC ProductSearch: products: [Product] - List of products recordsFiltered: Int - Total number of products. titleTag: String - Title used in the title's tag metaTagDescription: String - String to be used in the