urn:noticeable:projects:Q8YuGWPOCMmZDwnKUywVDev Center Updatesbigcommerce.com2022-03-28T21:02:59.218ZCopyright © Dev CenterNoticeablehttps://storage.noticeable.io/projects/Q8YuGWPOCMmZDwnKUywV/newspages/IWS24s1AhDLHDJPwIDx2/01h55ta3gs073dkq368xnhykwm-header-logo.pnghttps://storage.noticeable.io/projects/Q8YuGWPOCMmZDwnKUywV/newspages/IWS24s1AhDLHDJPwIDx2/01h55ta3gs073dkq368xnhykwm-header-logo.png#0d47a1urn:noticeable:publications:HG5NjuePyZNiARkIxTVP2022-03-28T20:51:01.973Z2022-03-28T21:02:59.218ZChange to default number of product images returned by GraphQL on April 15On April 15, 2022, the behavior of the product.images node in the GraphQL storefront API will be changing to only return 10 images by default. If you wish to request a different number of product images, you should specify the`first`<p>On April 15, 2022, the behavior of the product.images node in the GraphQL storefront API will be changing to only return 10 images by default. If you wish to request a different number of product images, you should specify the <code>`first`</code> argument explicitly with your request, which is considered a best practice when interacting with any paginated collection.</p><p>For example, if you were previously sending a request like this:</p><pre><code>query productsWithImages { site { products { edges { cursor node { entityId name images { // will return 10 images unless explicit arguments are specified edges { node { url(width: 640) } } } } } } } } </code></pre><p>You could instead send a request like this:</p><pre><code>query productsWithImages { site { products(first: 5) { // as a best practice, use `first` on all collections to specify page size edges { cursor node { entityId name images (first:20) { // will return up to 20 images per product edges { node { url(width: 640) } } } } } } } } </code></pre><p>Please note that requesting larger amounts of data with increased page sizes will factor into the GraphQL complexity calculation for your query.</p>BigCommerce[email protected]urn:noticeable:publications:J2AUc2FPd21VIZcnLDU42021-12-02T15:44:34.430Z2021-12-02T18:36:34.638ZAPI Updates for December 2, 2021API The Add to Cart URLs example now uses promises to demonstrate using JavaScript to make serial requests to a single endpoint. The Add Consignments to Checkout endpoint now reflects limits to the number of line items a consignment can<p><strong>API</strong></p><ul><li><p>The <a href="https://developer.bigcommerce.com/api-docs/storefront/add-to-cart-urls?utm_source=noticeable&amp;utm_campaign=bcdevchangelog.api-updates-for-december-2-2021&amp;utm_content=publication+link&amp;utm_id=Q8YuGWPOCMmZDwnKUywV.IWS24s1AhDLHDJPwIDx2.J2AUc2FPd21VIZcnLDU4&amp;utm_medium=newspage" rel="noopener nofollow" target="_blank" title="Add to Cart URLs">Add to Cart URLs</a> example now uses promises to demonstrate using JavaScript to make serial requests to a single endpoint.</p></li><li><p>The <a href="https://developer.bigcommerce.com/api-reference/store-management/checkouts/checkout-consignments/checkoutsconsignmentsbycheckoutidpost?utm_source=noticeable&amp;utm_campaign=bcdevchangelog.api-updates-for-december-2-2021&amp;utm_content=publication+link&amp;utm_id=Q8YuGWPOCMmZDwnKUywV.IWS24s1AhDLHDJPwIDx2.J2AUc2FPd21VIZcnLDU4&amp;utm_medium=newspage" rel="noopener nofollow" target="_blank" title="Add Consignment to Checkout">Add Consignments to Checkout</a> endpoint now reflects limits to the number of line items a consignment can contain.</p></li></ul>BigCommerce[email protected]urn:noticeable:publications:s9tpgqP8WzRC47mvDoyf2021-09-27T21:21:21.779Z2021-09-27T21:25:18.863ZGraphQL Storefront API can now be used to power Stencil theme contextIt is now possible to augment the data available in the theme context through the use of GraphQL queries described directly in the Front Matter of template files. Using this capability, you can fetch data a little bit more flexibly to build<p>It is now possible to augment the data available in the theme context through the use of GraphQL queries described directly in the Front Matter of template files.</p><p>Using this capability, you can fetch data a little bit more flexibly to build your themes.</p><p>Here’s an example of using a GraphQL query in Front Matter to fetch metafields in product.html:</p><pre><code>--- product: videos: limit: {{theme_settings.productpage_videos_count}} reviews: limit: {{theme_settings.productpage_reviews_count}} related_products: limit: {{theme_settings.productpage_related_products_count}} similar_by_views: limit: {{theme_settings.productpage_similar_by_views_count}} gql: "query productMetafieldsById($productId: Int!) { site { product(entityId: $productId) { metafields(namespace: \"my-namespace\") { edges { node { key value } } } } } } " ---</code></pre><p>More information on how to use this new storefront capability is available here: <a href="https://developer.bigcommerce.com/stencil-docs/reference-docs/front-matter-reference?utm_source=noticeable&amp;utm_campaign=bcdevchangelog.graphql-storefront-api-can-now-be-used-to-power-stencil-theme-context&amp;utm_content=publication+link&amp;utm_id=Q8YuGWPOCMmZDwnKUywV.IWS24s1AhDLHDJPwIDx2.s9tpgqP8WzRC47mvDoyf&amp;utm_medium=newspage#graphql-attributes" rel="noopener nofollow" target="_blank">https://developer.bigcommerce.com/stencil-docs/reference-docs/front-matter-reference#graphql-attributes</a></p>BigCommerce[email protected]urn:noticeable:publications:sOjV3i2Xsbg3DvfIDi2o2021-06-22T14:33:23.841Z2021-06-22T14:47:18.861ZRendered Widget HTML now available in GraphQL Storefront APIYou may now fetch the rendered HTML of widgets created via Widgets API or Page Builder. To get the content, you’ll need to provide a page type, and the ID for the page (if necessary). In the response, you’ll get a list of all the regions on<p>You may now fetch the rendered HTML of widgets created via <a href="https://developer.bigcommerce.com/api-docs/store-management/widgets/overview?utm_source=noticeable&amp;utm_campaign=bcdevchangelog.rendered-widget-html-now-available-in-graphql-storefront-api&amp;utm_content=publication+link&amp;utm_id=Q8YuGWPOCMmZDwnKUywV.IWS24s1AhDLHDJPwIDx2.sOjV3i2Xsbg3DvfIDi2o&amp;utm_medium=newspage" rel="noopener nofollow" target="_blank" title="Widgets API">Widgets API</a> or <a href="https://support.bigcommerce.com/s/article/Page-Builder?utm_source=noticeable&amp;utm_campaign=bcdevchangelog.rendered-widget-html-now-available-in-graphql-storefront-api&amp;utm_content=publication+link&amp;utm_id=Q8YuGWPOCMmZDwnKUywV.IWS24s1AhDLHDJPwIDx2.sOjV3i2Xsbg3DvfIDi2o&amp;utm_medium=newspage" rel="noopener nofollow" target="_blank" title="Page Builder">Page Builder</a>.</p><p>To get the content, you’ll need to provide a page type, and the ID for the page (if necessary). In the response, you’ll get a list of all the regions on that page, and the HTML of the widgets within those regions. This response can be used to inject Widget content into a headless storefront, or in any other situation where you need to flexibly access the content.</p><p>Here’s an example query:</p><pre><code># Get the widget HTML for the home page query getHomePageContentWidgets { site { content { renderedRegionsByPageType(pageType: HOME) { regions { name html } } } } }</code></pre>BigCommerce[email protected]urn:noticeable:publications:K30DGuxzXb4qYsbvvg3S2021-05-19T17:53:35.712Z2021-05-21T22:34:12.053ZGraphQL Storefront API now supports sorting products within categoriesThe GraphQL Storefront API’s now supports sorting the products on a Category node, using the sortBy parameter. This will match the equivalent sorting behaviors on the BigCommerce Storefront (Stencil). Consider this query: query<p>The GraphQL Storefront API’s now supports sorting the products on a Category node, using the <code>sortBy</code> parameter. This will match the equivalent sorting behaviors on the BigCommerce Storefront (Stencil).</p><p>Consider this query:</p><pre><code>query CategoryByUrl { site { route(path: "/shop-all") { node { __typename id ... on Category { name products(first: 20, sortBy: DEFAULT) { # Use sortBy parameter to use any of the available storefront sorts edges { node { name defaultImage { url(width: 360) } } } } } } } } }</code></pre>BigCommerce[email protected]urn:noticeable:publications:Pd9pdRIth5iMCUjGs5Z92021-05-19T17:53:35.712Z2021-05-21T15:04:52.735ZGraphQL Login Mutation now returns entire Customer objectThe GraphQL Storefront API’s Login Mutation now supports fetching all of the details of the customer account after a successful login. Consider this query: mutation Login($email: String!, $pass: String!) { login(email: $email, password:<p>The GraphQL Storefront API’s Login Mutation now supports fetching all of the details of the customer account after a successful login. Consider this query:</p><pre><code>mutation Login($email: String!, $pass: String!) { login(email: $email, password: $pass) { result customer { entityId firstName lastName email storeCredit { value currencyCode } attributes { attribute(entityId: 123) { name value } } } } }</code></pre>BigCommerce[email protected]urn:noticeable:publications:LWCx62zsW8z3lzySwG0q2021-03-08T16:11:48.775Z2024-02-01T21:20:54.772ZUPC, MPN, and GTIN now available in Storefront GraphQL APIThe UPC, MPN, and GTIN fields are now available on both product and variant nodes in the GraphQL Storefront API<ul><li><p>The UPC, MPN, and GTIN fields are now available on both <code>product</code> and <code>variant</code> nodes in the GraphQL Storefront API</p></li></ul>BigCommerce[email protected]urn:noticeable:publications:tXnqgASWy11cd6KysunL2020-10-28T18:24:00.001Z2020-10-29T01:24:31.435ZGraphQL Complexity Limit Increased (October 2020)We have once again adjusted the GraphQL Storefront API complexity limit to be more permissive, based on developer feedback. If you have previously bumped up against the complexity limit for a particular query, you are encouraged to try...<p>We have once again adjusted the GraphQL Storefront API complexity limit to be more permissive, based on developer feedback.</p> <p>If you have previously bumped up against the complexity limit for a particular query, you are encouraged to try it again, as it may now be supported.</p> <p>We will continue to tweak this limit based on feedback from our developer community, in order to strike the right balance between platform performance and the needs of custom storefronts.</p> BigCommerce[email protected]urn:noticeable:publications:r3uRn5tNI7acUJwUZ4Xf2020-07-28T16:22:00.001Z2020-07-29T18:29:50.553ZGraphQL Storefront API Complexity Scoring AdjustedBased on feedback from our developer community, we've adjusted the weighting of our GraphQL Storefront API's complexity scoring in order to be more permissive. As a result, queries which may have previously been rejected on the basis of...<p>Based on feedback from our developer community, we’ve adjusted the weighting of our GraphQL Storefront API’s complexity scoring in order to be more permissive. As a result, queries which may have previously been rejected on the basis of complexity may now pass the complexity check and be allowed.</p> <p>The weighting of several nodes related to product subresources (child nodes of the <code>Product</code> type) have been adjusted, and the <code>product.variants</code> node in particular has been adjusted to support up to 250 variants in one request, from the previous limit of 50.</p> <p>If you’ve hit the complexity limit in the past, feel free to try your query again to see if it’s now allowed.</p> <p>We will continue to adjust this limit based on customer feedback as we learn more about how the GraphQL Storefront API is being used, as well as its performance and scalability characteristics.</p> BigCommerce[email protected]urn:noticeable:publications:j25fLRUzwhuXqbFHbIBA2020-06-25T01:26:00.001Z2020-06-25T02:09:00.968ZGraphQL Storefront API - Bulk Pricing on Products and VariantsThe GraphQL Storefront API now supports fetching the bulk pricing tiers on both products and variants. Consider this query: query bulkPricingTiers { site { products(first: 3) { edges { cursor node...<p>The GraphQL Storefront API now supports fetching the bulk pricing tiers on both products and variants.</p> <p>Consider this query:</p> <pre><code>query <span class="hljs-class">bulkPricingTiers </span>{ <span class="hljs-class">site </span>{ products(first: <span class="hljs-number">3</span>) { <span class="hljs-class">edges </span>{ cursor <span class="hljs-class">node </span>{ entityId name <span class="hljs-class">prices </span>{ <span class="hljs-class">price </span>{ value currencyCode } <span class="hljs-class">bulkPricing </span>{ ... BulkPricingFields } } variants(first: <span class="hljs-number">3</span>) { <span class="hljs-class">edges </span>{ <span class="hljs-class">node </span>{ sku <span class="hljs-class">prices </span>{ <span class="hljs-class">price </span>{ value currencyCode } <span class="hljs-class">bulkPricing </span>{ ... BulkPricingFields } } } } } } } } } } fragment BulkPricingFields on <span class="hljs-class">BulkPricingTier </span>{ minimumQuantity maximumQuantity ... on <span class="hljs-class">BulkPricingFixedPriceDiscount </span>{ price } ... on <span class="hljs-class">BulkPricingRelativePriceDiscount </span>{ priceAdjustment } ... on <span class="hljs-class">BulkPricingPercentageDiscount </span>{ percentOff } } </code></pre> BigCommerce[email protected]