You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To unify the hir/encoder types, HIR types should be constructible. To modify documents (#420), the HIR is likely the nicest level to do it at (vs the low-level parser AST).
So the rough plan is:
make the HIR nodes constructible (prob just add builders with buildstructor)
have the whole HIR have one root node, so you can clone + modify a HIR
add a serialization API to the HIR so you can use it instead of apollo-encoder
add some basic modification methods for eg. adding fields or removing directives
later integrate it with salsa possibly using a schema diff format??
The text was updated successfully, but these errors were encountered:
A pretty big issue i'm running into with having a single root node at the moment is that it more or less guarantees that there will be multiple Arcs pointing at the same definition nodes. That makes modifying them non-obvious, you can't just do Arc::get_mut() with multiple pointees and having a ton of mutexes in the hir seems quite bad/heavy weight.
Our wording evolved a bit, so the issue is a bit outdated, as we are looking at having both a constructible HIR and a constructible "MIR". I'll keep it like this for now as we are still designing the higher level parts. Simon made a lot of progress on this branch: https://github.com/apollographql/apollo-rs/tree/mir
Supersedes #590, and likely #580.
To unify the hir/encoder types, HIR types should be constructible. To modify documents (#420), the HIR is likely the nicest level to do it at (vs the low-level parser AST).
So the rough plan is:
buildstructor
)The text was updated successfully, but these errors were encountered: