Copyright © Dev Centerhttps://validator.w3.org/feed/docs/rss2.htmlDev Center Updatesbigcommerce.comhttp://localhost:4567/changelog/?utm_source=noticeable&utm_campaign=bcdevchangelog&utm_content=other&utm_id=Q8YuGWPOCMmZDwnKUywV.IWS24s1AhDLHDJPwIDx2&utm_medium=newspageenMon, 28 Mar 2022 21:02:59 GMThttps://noticeable.iohttps://storage.noticeable.io/projects/Q8YuGWPOCMmZDwnKUywV/newspages/IWS24s1AhDLHDJPwIDx2/01h55ta3gs073dkq368xnhykwm-header-logo.pngDev Center Updateshttp://localhost:4567/changelog/?utm_source=noticeable&utm_campaign=bcdevchangelog&utm_content=other&utm_id=Q8YuGWPOCMmZDwnKUywV.IWS24s1AhDLHDJPwIDx2&utm_medium=newspagehttps://storage.noticeable.io/projects/Q8YuGWPOCMmZDwnKUywV/newspages/IWS24s1AhDLHDJPwIDx2/01h55ta3gs073dkq368xnhykwm-header-logo.png#0d47a1HG5NjuePyZNiARkIxTVPMon, 28 Mar 2022 20:51:01 GMT[email protected] (BigCommerce)Change to default number of product images returned by GraphQL on April 15https://bcdevchangelog.noticeable.news/publications/change-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` argument explicitly with your request, which is considered a best practice when interacting with any paginated collection.

For example, if you were previously sending a request like this:

query productsWithImages {
   site {
     products {
       edges {
         cursor
         node {
           entityId
           name
          images { // will return 10 images unless explicit arguments are specified
            edges {
              node {
                url(width: 640)
              }
            }
          }
         }
       }
     }
   }
 }

You could instead send a request like this:

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)
              }
            }
          }
         }
       }
     }
   }
 }

Please note that requesting larger amounts of data with increased page sizes will factor into the GraphQL complexity calculation for your query.

]]>
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 `first` argument explicitly with your request, which is considered a best practice when interacting with any paginated collection.

For example, if you were previously sending a request like this:

query productsWithImages {
   site {
     products {
       edges {
         cursor
         node {
           entityId
           name
          images { // will return 10 images unless explicit arguments are specified
            edges {
              node {
                url(width: 640)
              }
            }
          }
         }
       }
     }
   }
 }

You could instead send a request like this:

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)
              }
            }
          }
         }
       }
     }
   }
 }

Please note that requesting larger amounts of data with increased page sizes will factor into the GraphQL complexity calculation for your query.

]]>
Storefront APIWarning
J2AUc2FPd21VIZcnLDU4Thu, 02 Dec 2021 15:44:34 GMT[email protected] (BigCommerce)API Updates for December 2, 2021https://bcdevchangelog.noticeable.news/publications/api-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 contain.

]]>
API

  • 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 contain.

]]>
Storefront APIBug FixEnhancementAnnouncement
s9tpgqP8WzRC47mvDoyfMon, 27 Sep 2021 21:21:21 GMT[email protected] (BigCommerce)GraphQL Storefront API can now be used to power Stencil theme contexthttps://bcdevchangelog.noticeable.news/publications/graphql-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 your themes.

Here’s an example of using a GraphQL query in Front Matter to fetch metafields in product.html:

---
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
          }
        }
      }
    }
  }
}
"
---

More information on how to use this new storefront capability is available here: https://developer.bigcommerce.com/stencil-docs/reference-docs/front-matter-reference#graphql-attributes

]]>
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.

Using this capability, you can fetch data a little bit more flexibly to build your themes.

Here’s an example of using a GraphQL query in Front Matter to fetch metafields in product.html:

---
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
          }
        }
      }
    }
  }
}
"
---

More information on how to use this new storefront capability is available here: https://developer.bigcommerce.com/stencil-docs/reference-docs/front-matter-reference#graphql-attributes

]]>
StencilStorefront APIAnnouncementEnhancement
sOjV3i2Xsbg3DvfIDi2oTue, 22 Jun 2021 14:33:23 GMT[email protected] (BigCommerce)Rendered Widget HTML now available in GraphQL Storefront APIhttps://bcdevchangelog.noticeable.news/publications/rendered-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 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.

Here’s an example query:

# Get the widget HTML for the home page
query getHomePageContentWidgets {
  site {
    content {
      renderedRegionsByPageType(pageType: HOME) {
        regions {
          name
          html
        }
      }
    }
  }
}
]]>
You 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 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.

Here’s an example query:

# Get the widget HTML for the home page
query getHomePageContentWidgets {
  site {
    content {
      renderedRegionsByPageType(pageType: HOME) {
        regions {
          name
          html
        }
      }
    }
  }
}
]]>
APIAnnouncementStorefront API
K30DGuxzXb4qYsbvvg3SWed, 19 May 2021 17:53:35 GMT[email protected] (BigCommerce)GraphQL Storefront API now supports sorting products within categorieshttps://bcdevchangelog.noticeable.news/publications/graphql-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 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)
                }
              }
            }
          }
        }
      }
    }
  }
}
]]>
The 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 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)
                }
              }
            }
          }
        }
      }
    }
  }
}
]]>
Storefront APIEnhancement
Pd9pdRIth5iMCUjGs5Z9Wed, 19 May 2021 17:53:35 GMT[email protected] (BigCommerce)GraphQL Login Mutation now returns entire Customer objecthttps://bcdevchangelog.noticeable.news/publications/graphql-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: $pass) {
    result
    customer {
      entityId
      firstName
      lastName
      email
      storeCredit {
        value
        currencyCode
      }
      attributes {
        attribute(entityId: 123) {
          name
          value
        }
      }
    }
  }
}
]]>
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:

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
        }
      }
    }
  }
}
]]>
Storefront APIEnhancement
LWCx62zsW8z3lzySwG0qMon, 08 Mar 2021 16:11:48 GMT[email protected] (BigCommerce)UPC, MPN, and GTIN now available in Storefront GraphQL APIhttps://bcdevchangelog.noticeable.news/publications/upc-mpn-and-gtin-now-available-in-storefront-graphql-api
  • The UPC, MPN, and GTIN fields are now available on both product and variant nodes in the GraphQL Storefront API

  • ]]>
  • The UPC, MPN, and GTIN fields are now available on both product and variant nodes in the GraphQL Storefront API

  • ]]>
    Storefront APIEnhancementAPIGraphQL
    tXnqgASWy11cd6KysunLWed, 28 Oct 2020 18:24:00 GMT[email protected] (BigCommerce)GraphQL Complexity Limit Increased (October 2020)https://bcdevchangelog.noticeable.news/publications/graph-ql-complexity-limit-increased-october-2020Storefront APIEnhancementAnnouncementr3uRn5tNI7acUJwUZ4XfTue, 28 Jul 2020 16:22:00 GMT[email protected] (BigCommerce)GraphQL Storefront API Complexity Scoring Adjustedhttps://bcdevchangelog.noticeable.news/publications/graph-ql-storefront-api-complexity-scoring-adjustedStorefront APIEnhancementj25fLRUzwhuXqbFHbIBAThu, 25 Jun 2020 01:26:00 GMT[email protected] (BigCommerce)GraphQL Storefront API - Bulk Pricing on Products and Variantshttps://bcdevchangelog.noticeable.news/publications/graph-ql-storefront-api-bulk-pricing-on-products-and-variantsAPIStorefront APIEnhancement