snapshot-labs / sx-monorepo

Snapshot X monorepo
https://docs.snapshotx.xyz
MIT License
11 stars 10 forks source link

fix: fix offchain spaces loading using wrong graphql queries #381

Closed wa0x6e closed 1 month ago

wa0x6e commented 1 month ago

Summary

Closes: #366 #373

This PR revert back the offchain spaces loading to use the Space endpoint, instead of Ranking, due to them not being swappable, causing all loadSpaces from offchain to always load the top X spaces, and not honoring the id_in filter.

This was causing:

This PR will use the ranking graphql endpoint only when no id_in filter is passed to loadSpaces, and used as extra, and not replacement

How to test

  1. Your follow list should list all 25 spaces
  2. The explore page should load space sorted by popularity
Sekhmet commented 1 month ago

Can we use two different queries, one for ranking and other for rest? Maybe switch it based existence of id_in filter?

wa0x6e commented 1 month ago

Can we use two different queries, one for ranking and other for rest? Maybe switch it based existence of id_in filter?

Done