sanity-io / sanity-algolia

Utilities for indexing Sanity documents in Algolia
MIT License
67 stars 16 forks source link

Add custom Sanity groq projections #6

Closed runeb closed 3 years ago

runeb commented 3 years ago

This commit adds the option to customize how documents are fetched from Sanity, before you map them into Algolia records. With customized projections it is easy to resolve references or be very specific about which values you need in your Algolia records. If you don't specify a projection it will fetch the full document as-is.

Note that the API has changed slightly and this will be a major version bump.