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

Selections #316

Open
2 tasks done
cjcartier opened this issue Jan 6, 2025 · 0 comments
Open
2 tasks done

Selections #316

cjcartier opened this issue Jan 6, 2025 · 0 comments

Comments

@cjcartier
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Question

I just updated to 1.0.0 to test it out. There are a lot of amazing new features. That said, I am heavily using `selections` for every file and then using `TypeFromSelection` to generate the types. That feature seems to be replaced by `fragments`. But from what I can tell, I need to feed fragments the type in order to generate the query in order to infer the types from it. Kinda feels like a cart ahead of the horse deal. 

I do see that if I use the typegen from sanity that I can use the types for top level documents, but with `selections` I was able to create a chunk of the query and have corresponding typegen at any level of the query. 

Is there something that I am missing? Is this feature going to resurface? I have reverted as this would be an enormous lift for me to type out every selection just so that the query is not erroring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant