8000 Comparison to Ariadne · Issue #440 · zkat/miette · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Comparison to Ariadne #440

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

Open
ShalokShalom opened this issue May 9, 2025 · 2 comments
Open

Comparison to Ariadne #440

ShalokShalom opened this issue May 9, 2025 · 2 comments

Comments

@ShalokShalom
Copy link

Hi there 👋🏻

I currently struggle to see the benefits or differences between this library and its inspiration, Ariadne.

Do you have there maybe a better overview?
Thanks a lot 🥳

@zkat
Copy link
Owner
zkat commented May 11, 2025

Miette is actually a deeper protocol and more of a diagnostic definition and management library. It includes a generic protocol for defining parts of errors (error code, locations, documentation/URLs/etc), a derive macro to make protocol implementations easier, an abstraction for generic error handling (like with anyhow), and finally various “reporters” that know how to render these generic implementations into formats more useful for her end user, such as the GraphicalHandler.

Ariadne is only that last piece. It does reporting but you have to set up all the calls yourself through a builder.

Ariadne is one implementation of one graphical reporter, and can only render in that format. When you define a diagnostic in miette you can actually switch how you render the reports at runtime. For example, miette will automatically switch to a screen reader friendly renderer when a certain environment variable is present.

Finally: I don’t know if anyone has done this already, but it would be very easy to create an Ariadne renderer for miette diagnostics, and turn off the feature flag in miette for using (and compiling) the built in renderer.

@ShalokShalom
Copy link
Author

Sounds like this is worth putting somewhere else, where its more accessible for everybody, love it.

(I also think the Ariadne screenshot examples look a bit simpler and approachable, which let me think Miette is a "more complicated" implementations. 👍🏻 )

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

No branches or pull requests

2 participants
0