MathiasKandelborg/TRUE-framework

View on GitHub
util/api/queries/singlePageFromRoute.ts

Summary

Maintainability
A
0 mins
Test Coverage
import groq from 'groq'

const singlePage = groq`
*[_type == "route" && slug.current == $slug][0]{
  page-> {
    ...,
    content[] {
      ...,
      cta {
        ...,
        route->
      },
      ctas[] {
        ...,
        route->
      }
    }
  }
}
`
export default singlePage