Namespaces allow for a stronger grouping of functionality within the GROQ specification (https://sanity-io.github.io/GROQ/). They create dedicated scopes for global functions, as well as safer distinctions for specific implementations of GROQ.
When using GROQ to query, Sanity Content Lake has a few key namespaces:
- The global namespace – all the base GROQ functions
- The pt namespace – specific functions pertaining to Portable Text
- The geo namespace – functions for managing and querying against geolocation
- The sanity namespace – functions for querying against the current project environment
- The delta namespace – functions for reasoning about changes to a document
- The math namespace - functions for performing mathematical operations on numerical inputs
- The string namespace - functions for searching and processing strings
- The array namespace - functions for processing arrays