Skip to content

Conversation

@ginger51011
Copy link
Contributor

Again from #136. These are just minimal docs, to help with understanding trustfall_core/src/ir/

@ginger51011 ginger51011 changed the title Add minimal documentation to in Add minimal documentation to in ir in trustfall_core Feb 10, 2023
@ginger51011
Copy link
Contributor Author

rustfmt fail was on me, my bad

Copy link
Owner

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks really good -- thanks for putting it together! Just a few polishing suggestions here and there. Let me know what you think?

#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub BTreeMap<Arc<str>, FieldValue>,
);

/// IR of components of a query, containing information about the vertex ID
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it's worth trying to stick to always saying Vid throughout the docs, even linking to it as needed? It's a core concept and will keep coming up all over the place in the IR, so I'm worried that mixing between vertex ID and Vid may be more confusing than just sticking to the unambiguous term that the reader has to learn.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be worth linking it every time (so it's always easy to find the definition), but yes it should be the same. I'll replace them!

}

/// Vertex ID
#[doc(alias("vertex", "node"))]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! 💯


/// Values of fields in GraphQL types.
///
/// For version that is serialized as an untagged enum, see [TransparentValue].
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

ginger51011 and others added 3 commits February 10, 2023 17:38
Better IRQueryComponent docs

Co-authored-by: Predrag Gruevski <[email protected]>
Co-authored-by: Predrag Gruevski <[email protected]>
@ginger51011
Copy link
Contributor Author

Thank you for taking the time to review!

/// A small subtlety is important here: it's possible that the tagged value is *local* to
/// the scope being filtered. In that case, the context *will not* yet have a token associated
/// with the vertex ID of the tag's ContextField. However, in such cases, the tagged value
/// with the [Vid] of the tag's ContextField. However, in such cases, the tagged value
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't have to be in this PR, just wondering: can we link ContextField here too?

@obi1kenobi obi1kenobi enabled auto-merge (squash) February 10, 2023 18:48
@obi1kenobi
Copy link
Owner

Thanks for all the awesome contributions, they are making a huge difference 🚀

@obi1kenobi obi1kenobi merged commit d2c1e1c into obi1kenobi:main Feb 10, 2023
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

Successfully merging this pull request may close these issues.

2 participants