Skip to main content

FastStore - March, 2022

ยท 3 min read

The FastStore API now includes an Express GraphQL Server, and the FastStore UI now has a new Dropdown component. Also, the performance of the useStorage hook has been improved.

FastStore UIโ€‹

  • ๐ŸŽ‰ New Dropdown molecule - #1178 Use the Dropdown component as an options menu or a dropdown select. dropdown-menu

FastStore SDKโ€‹

setSession functionโ€‹

  • ๐Ÿ› Fixed setSession function type - #1172 Now the ContextValue of the setSession function receives a session: Partial<Session> argument. With the fix, it's possible to pass partial information of a session. For example:
const { setSession } = useSession()
setSession({ postalCode: 'foo' })
  • โœจ Improve the performance of useStorage hook - #1186 The setTimeout function was created to prevent the creation of tasks that take longer than 50ms to process. The function improves the performance of the useStorage hook by wrapping two of its tasks: the async promise and the set state of an item.

  • โœจ Add setFacets function to the search context - #1189 The setFacets function sets all selected facets without any processing, allowing full control of the selected facets.

FastStore APIโ€‹

VTEX Platformโ€‹

  • ๐Ÿ› Added missing totalCount field to pageInfo in allCollections query - #1173 Now the resolver for the allCollections query returns the number of valid collections in the store when a user asks for pageInfo.totalCount field.

  • ๐ŸŽ‰ New Session query - #1176 The Session query returns only the channel and country values. The addition of this query enables VTEX regionalization, which requires the regionId located within the channel.

  • ๐ŸŽ‰ Add local server and GraphQL tests - #1179 The @faststore/api package now comes with an Express GraphQL Server setup allowing you to test the API without having to link the package to a store.

  • โœจ hideUnavaibleitems parameter in the search API - #1180 The Search API now has a parameter called hideUnavailableItems. This parameter either hides (true) or displays (false) an out-of-stock product.

  • ๐Ÿ› Removed frontend computation to the backend - #1184 Offers are now sorted according to the order of the offers array.

  • โœจ Returning null as profile - #1190 Now the API returns null for the person query when executed by an anonymous user, avoiding a mismatch with the default user session values, preventing the session of the anonymous user from being reset, and lowering the Total Blocking Time (TBT) metric.



  • ๐Ÿ› Fixed codebase typos - #1183