-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
WIP: Add documentation for the Adapter
trait
#142
base: main
Are you sure you want to change the base?
WIP: Add documentation for the Adapter
trait
#142
Conversation
Tbh I'm thinking of completely revamping this trait. #131 will remove the explicit "hint" arguments in favor of a What do you think? Are the names of |
Sorry about the CI, have added I have tried, based on --- Above this line was before you posted your comment :) Right now I think this trait is quite difficult to understand, but looking at If nothing else, For me at least, with very limited background in graph theory and graph databases, but some knowledge of GraphQL, I think it might be helpful to explain concepts in the adaptors by describing them in a GraphQL context (like "a starting vertex is like a field of the |
This is the fault of insufficient docs 😅 Let's try to figure out how to best direct the next person to that easier-to-implement trait. It's easier to implement because it can't do everything that the "real" one under the hood can do, but it's enough for most cases.
Yes, agreed. I realized a design like #131 is necessary because the hint parameters are technically all you need but in practice are just waaay too tedious to use. After I've put in a few more iterations on #131, I'd love your help and feedback there on naming and documentation. It's super useful to have a second pair of eyes on these things — thanks for taking the time!
I understand the sentiment here. I have two concerns, and a concrete proposal which I'll name first. I think we may be better off with an "Learning Trustfall for GraphQL users" page somewhere in the docs, instead of inlining the GraphQL analogies and comparisons into the main documentation. Here's why:
By having documentation free of concepts from other languages, and having separate "Learning Trustfall for X users" pages in the docs, we can let the readers self-select into the right groups and then we can make the right analogies to them:
What do you think? |
I'd be happy to help! Right now I'm looking intro using Trustfall myself, so I'm very interested in seeing improvements.
Reading your response I would say I agree. I think the reason I have to reason around it like that myself is that when there is nothing to latch onto, it is much easier to map it to something you already know. If anything, I think the docs (or README, or whatever) could use some images of operations. I saw some on your blog, but they don't explain in much detail what actually happens inside the adapters/engine, and how that would be different from GraphQL. This might be just me though. Another question is: How much does one want to steer the adapter implementations? Looking at the demos, there are definitely patterns that occurs several times. Are all users to write their own
Just those two are very useful: Take something the users know, and explain new concept with old ones. Perhaps we shouldn't explain things using only GraphQL, but implementing these in the docs (where people go first) might come a long way. |
The README definitely needs several layers' worth of rework. Some images would definitely be nice, but I think some of the "getting started" docs might be more useful now that many people are already at least somewhat familiar with the project and what it does. Ultimately it's just a question of sequencing the work in maximum-impact order. I think good images are a bit difficult to make, and probably not the immediate highest priority compared to "getting started" docs that point to
I've started several drafts of macros, and never quite found a design I loved. It's really unfortunate that macros are not allowed to generate a "match arm," because that might have been nice. I'll continue thinking about this. If you end up looking at the problem and find a possible design something you like, please bring it up in an issue or draft PR! |
I'd also love to know about the domain where you're thinking about using Trustfall, if you'd be up for a chat? I hang out on the rust-lang Zulip and you can also find me on Discord if you'd prefer that. No pressure, obviously. |
15f64a4
to
64ebfd5
Compare
I think it's important that this trait in particular is well-documented. Right now I'm working based on demos, but I chose to relate it to GraphQL since it's currently the query language of choice.
I might be a bit off with descriptions here, and I think the
query_hint
andvertex_hint
may need more explanations, since they are ignored in the demos from what I can see. But according to #131 these are subject to change soonTM 🛩️