You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the times, when a subgraph schema change happens, the previous versions of core-sdk doesn't work anymore, due to missing properties in the subgraph request.
This is mostly due to the fact that the implementation of the subgraph requests is auto-generated (use of graphql-codegen), leading to get all properties always required even when not functionally needed.
In order to allow, as much as possible, the old core-sdk versions to still work with new subgraphs, we could limit the fetched properties only to those functionally required for the services.
For example, the WooCommerce plugin fetches a seller based on a wallet address, using bosonSDK.getSellersByAddress(address) which calls the subgraph query getSellersQuery(), querying all properties SellerFields (https://github.com/bosonprotocol/core-components/blob/main/packages/core-sdk/src/accounts/queries.graphql#L286). However, what needs the WooCommerce plugin is only the seller.id. So in that case all other fields queried are useless.
The text was updated successfully, but these errors were encountered:
Most of the times, when a subgraph schema change happens, the previous versions of core-sdk doesn't work anymore, due to missing properties in the subgraph request.
This is mostly due to the fact that the implementation of the subgraph requests is auto-generated (use of graphql-codegen), leading to get all properties always required even when not functionally needed.
In order to allow, as much as possible, the old core-sdk versions to still work with new subgraphs, we could limit the fetched properties only to those functionally required for the services.
For example, the WooCommerce plugin fetches a seller based on a wallet address, using bosonSDK.getSellersByAddress(address) which calls the subgraph query getSellersQuery(), querying all properties SellerFields (https://github.com/bosonprotocol/core-components/blob/main/packages/core-sdk/src/accounts/queries.graphql#L286). However, what needs the WooCommerce plugin is only the seller.id. So in that case all other fields queried are useless.
The text was updated successfully, but these errors were encountered: