Last active
December 1, 2022 23:17
-
-
Save ricardocasares/aef9f9fffe48e91fdd37cfae7b28405e to your computer and use it in GitHub Desktop.
GROQ Queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const FREE_ROOMS = groq` | |
*[_type == 'room' && count(*[_type == 'booking' && ^._id in room[]._ref && ((checkin >= $ci && checkin <= $co)||(checkin <= $ci && checkout >= $ci))]) == 0]{...} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment