Replies: 3 comments 9 replies
-
I was experimenting on a compiler (mentioned in the readme / scattered across some todos). At a high level it was meant to fix the request waterfall issues, add mutations and allow for an SSR experience similar to React server components. The compiler implements a partially spec-compliant JS engine. And is able to scan basic JS, as you can see from the tests:
It becomes way harder keeping track of these GraphQL accessors, inside dynamic react components though. Essentially requiring a full-blown spec compliant JS-engine. https://github.com/facebook/prepack/tree/master/src proves it's possible... But the biggest challenge... hooks like
I experimented around with using ts-morph to be able to "auto-infer" these mappings from your apps type definitions. But the typescript compiler is just waaaaay too slow and isn't designed in a way in which it can be optimised. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, the new gqless refactor I've been working in since a couple months is completely usable right now (with possible incoming breaking changes, of course), and one of the main core stuff that has changed internally in how it works is that it doesn't make the proxies of the entire schema on generation time, and the proxies are not stateful as the previous/current version, instead, the new gqless has a lightweight json object of the schema and it makes the proxies on runtime, and the state of the everything is saved inside the client instance instead of module level, caching everything it can to improve performance of course. This core change has improved the memory usage greatly, allowed new usage features, and fixed a very hard problem to solve in the first version, which was recursive/deep types/queries (#53). It's important to note that mutations are officially supported, and after the beta release, supporting subscriptions is completely feasible and planned to be implemented As I said, the refactor is currently usable, but it has some issues to be fixed first in order to actually publish a official beta, and there isn't any docs other than the types, which have been commented for the most part and trying to make all the names as intuitive as possible. If you want to help this project at this early state, playing with it would be extremely appreciated, for now they have been published as it follows:
And very important to note, inside the new_gqless repo there are 2 examples, in which the project is being tested and developed, and they are the official way of learning how to use it in the meantime, since there isn't any official docs yet (and the old gqless docs don't apply at all, since there are a lot of usage changes/improvements):
And please, if you are willing to help debug/playing with it, please join the discord https://discord.gg/2gy8ZQxnGk, thank you |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, We have just released the new version v2 of gqless, please visit https://gqless.com for instructions, it now has Mutation support, Subscriptions support, Normalization and much more, feel free to enter our discord server, to open an issue or a discussion about anything related, thanks you for your contribution! 🎉 |
Beta Was this translation helpful? Give feedback.
-
This project is a great idea and I can imagine the fun coding this way.
I have been waiting for mutations and subscriptions to be ready so I can start a project with it.
Have the authors thought of opening a discord server or something else, so people can help out when more of us get to know more about the directions and design concepts?
Beta Was this translation helpful? Give feedback.
All reactions