@gadget-client/blog Changelog

The @gadget-client/blog npm package is generated by Gadget specifically for the blog app. The models, types, and functions are generated based on the backend Gadget resources and configuration. New versions of @gadget-client/blog are published for each backend change. See Installing for more information on installing this package.

This page documents the global behavior changes made to the generated API client over time. Changes to your Gadget app after each of the dates below will generate a new package version that includes the changes listed below that date.

Dec 12th, 2022

  • API clients instantiated without the environment option will default to the NODE_ENV environment if it is set to either development or production

Dec 2nd, 2022

  • Fixed a bug where API clients instantiated for different Gadget apps on the same host would share the same auth token. This happened a lot on locahost. Now, tokens are keyed by the endpoint they should be sent to, so auth state and login state is separate per Gadget app and environment. (https://github.com/gadget-inc/js-clients/pull/134)

  • Fixed the default browser authentication mode (BrowserSessionStorageType.Durable) to gracefully fall back to an in-memory storage option when window.localStorage isn't available or doesn't work. This is the case in Incognito mode in Chrome and Private Browsing mode in Safari. When localStorage isn't available, session state will only last as long as the tab does, and will reset on page navigation. Note: Shopify App developers using @gadgetinc/react-shopify-app-bridge use a special auth mechanism using Shopify Session tokens that is unaffected by this change. (https://github.com/gadget-inc/js-clients/pull/136)

Nov 25th, 2022

Nov 24th, 2022

  • Stopped automatically fetching relationships of models when no select: param is passed to a record finder. This means faster API calls for a better user experience and fewer unexpected GGT_PERMISSION_DENIED errors.

For example, if you were previously running const record = await api.widget.findOne(1), or const [{data: record}] = useFindOne(api.widget, 1), the record object would have all its relationship fields populated with data from the other models the Widget model has relationships to. After this change, the record object will only have fields that are stored on the Widget model itself. If you want to include related data, you must explicitly select it with the select: param. You can find an example documentation page for an app's select: param here.

Nov 21st, 2022

  • Fixed bug with api.directUploadToken() returning duplicate tokens if called multiple times in the same browser context

Sept 19th, 2022

July 29th, 2022

May 18th, 2022

March 31st, 2022

January 20th, 2022

Nov 21st, 2021

October 10th, 2021

Source code

Source code for the @gadgetinc/api-client-core package which contains all the utilities powering @gadget-client/blog can be found on GitHub.