Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: try groqd for typed sanity queries #44

Closed
wants to merge 1 commit into from

Conversation

jbranchaud
Copy link
Collaborator

I thought this would be an interesting spike. I'm not sure if I'm sold on it yet or not.

Pros:

  • Zod parsing/types are baked into the groqd API, so that stays in sync as you evolve the query
  • easier to share/reuse partial queries

Cons:

  • you kinda have to do two layers of mental translation: [data I want] --> groq --> groqd
  • groqd doesn't support the full groq syntax, not clear on where those edges are yet

groq

Copy link

vercel bot commented Dec 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
course-builder-docs ✅ Ready (Inspect) Visit Preview Dec 21, 2023 7:16pm
course-builder-poc ✅ Ready (Inspect) Visit Preview Dec 21, 2023 7:16pm

@jbranchaud
Copy link
Collaborator Author

groqd was worth trying out, but I think the limitations to the query language are going to conflict with some of our query patterns. That will make adoption tricky and having two ways to write queries scattered around the codebase seems more like tech debt than an enhancement.

@jbranchaud jbranchaud closed this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant