-
Notifications
You must be signed in to change notification settings - Fork 146
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
Documentation: 8 things I struggled with while learning surrealQL #559
Comments
Thanks @lveillard! I noticed something similar to FROM when I first encountered CREATE and saw that you can create multiple tables and added that to the documentation. I guess FROM will need an example as well. Also, I'm writing something interesting at the moment and I think I can fit some of your points in there. |
@lveillard Your list is very helpful! Could you elaborate on the point 4?
I'm not sure what the read-only field definition would look like. Could you show an example? |
Sorry the word "Futures" was missing in point 4. Imagine for instance a field full name defined as a future that gets the values of other two fields. And thanks @Dhghomon, I'm happy my time sharing my struggles was useful. Today my main blocking point is just not being able to use $input on events, I was able to find workarounds for the rest. Im still unsure about point 3 tho. My two other key feature request would be to:
CREATE company:1 set employees =+ (CREATE employee:1 set name = Ann) We can also update other things of the parent by using $parent inside and any of its properties. However this is not possible for Deletions. In deletions we need to use $before inside the return clause instead in order to nest things in a graphql manner. It has a workaround so I did not open an issue but I would like it to be consistente and have a Set in deletions, this would for instance enable cascade deletions like DELETE company:1 set employees = { DELETE employees return none} |
Hi! A few months later I think points 2, 3 and 4 are probably addressed now. How are you finding the other issues? Could be good to close this and make a new issue for each remaining point with a link to here, and then they can be addressed and closed one at a time. |
Hello @Dhghomon! I get 2) but how are 3 and 4 fixed? Are they better detailed in the docs?
For the other issues yes i can open specific threads |
Description
THings that are missing, aha moments or concepts without proper examples:
Polymorphism:
I think it deserves a full page, is polymorphism. For instance edges can point to multiple tables:
Also we can fetch polymorphic edges with this structure:
And a last thing around polymorphism not explained that Im not even sure is doable. This works
But afaik there is no equivalent shortcut for tables:
and requires doing the combinations:
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: