Say you have 2 queries:
GetPostsByUser and GetCommentsByUser
to make the development experience better say you want to have them grouped by "resource" instead:
PostsGetByUser and CommentsGetByUser
so that when you start typing posts in LSP suggestions you will see all queries for that resource
At this point why not place them together in a single module? it will put less burden on LSP server if you have a lot of queries (since by default all queries are exported to a top-level scope)
const userPosts = Posts.getByUser(sql)
I did create a POC implementation that you can see here in my fork (there was a naming fix along the way which is not included in this commit): eEQK@32827fb
Say you have 2 queries:
GetPostsByUserandGetCommentsByUserto make the development experience better say you want to have them grouped by "resource" instead:
PostsGetByUserandCommentsGetByUserso that when you start typing
postsin LSP suggestions you will see all queries for that resourceAt this point why not place them together in a single module? it will put less burden on LSP server if you have a lot of queries (since by default all queries are exported to a top-level scope)
I did create a POC implementation that you can see here in my fork (there was a naming fix along the way which is not included in this commit): eEQK@32827fb