Skip to content

Commit 7792cfb

Browse files
committed
change example links to point to the exact commit
1 parent a7f6164 commit 7792cfb

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

crates/apollo-parser/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ dual licensed as above, without any additional terms or conditions.
172172
[examples directory]: https://github.com/apollographql/apollo-rs/tree/main/crates/apollo-parser/examples
173173
[Get field names in an object]: https://github.com/apollographql/apollo-rs#get-field-names-in-an-object
174174
[Get variables used in a query]: https://github.com/apollographql/apollo-rs#get-variables-used-in-a-query
175-
[using apollo-rs with miette to display error diagnostics]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/examples/miette.rs
176-
[using apollo-rs with annotate_snippets to display error diagnostics]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/examples/annotate_snippet.rs
177-
[checking for unused variables]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/examples/unused_vars.rs
178-
[October 2021 specification]: https://spec.graphql.org/October2021
175+
[using apollo-rs with miette to display error diagnostics]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/miette.rs
176+
[using apollo-rs with annotate_snippets to display error diagnostics]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/annotate_snippet.rs
177+
[checking for unused variables]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/unused_vars.rs
178+
[October 2021 specification]: https://spec.graphql.org/October2021
Loading

crates/apollo-parser/src/error.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ use std::fmt;
2727
/// `Error`'s API allows for you to configure other ways to render your errors
2828
/// as well if a terminal-like environment is not where your final output goes.
2929
///
30-
/// [miette]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/examples/miette.rs
31-
/// [annotate_snippets]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/examples/annotate_snippet.rs
30+
/// ### Diagnostics
31+
///
32+
/// Using something like [miette] along with apollo-parser lets you have
33+
/// diagnostics that look like this:
34+
///
35+
/// <img src="https://github.com/apollographql/apollo-rs/crates/apollo-parser/screenshots/apollo_parser_error.png" alt="A screenshot of an error example produced by using apollo-parser and miette. The ascii display shows a graphql code snippet with line numbers to the left. Under the code sample there is a line pointing to where a value is missing in graphql code">
36+
///
37+
/// [miette]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/miette.rs
38+
/// [annotate_snippets]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/annotate_snippet.rs
3239
#[derive(PartialEq, Eq, Clone)]
3340
pub struct Error {
3441
pub(crate) message: String,

crates/apollo-parser/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@
165165
//! [examples directory]: https://github.com/apollographql/apollo-rs/tree/main/crates/apollo-parser/examples
166166
//! [Get field names in an object]: https://github.com/apollographql/apollo-rs#get-field-names-in-an-object
167167
//! [Get variables used in a query]: https://github.com/apollographql/apollo-rs#get-variables-used-in-a-query
168-
//! [using apollo-rs with miette to display error diagnostics]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/examples/miette.rs
169-
//! [using apollo-rs with annotate_snippets to display error diagnostics]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/examples/annotate_snippet.rs
170-
//! [checking for unused variables]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/examples/unused_vars.rs
168+
//! [using apollo-rs with miette to display error diagnostics]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/miette.rs
169+
//! [using apollo-rs with annotate_snippets to display error diagnostics]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/annotate_snippet.rs
170+
//! [checking for unused variables]: https://github.com/apollographql/apollo-rs/blob/a7f616454a53dcb8496725ceac6c63eacddefb2c/crates/apollo-parser/examples/unused_vars.rs
171171
//! [October 2021 specification]: https://spec.graphql.org/October2021
172172
//! [LICENSE-APACHE]: https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/LICENSE-APACHE
173173
//! [LICENSE-MIT]:https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-parser/LICENSE-MIT

0 commit comments

Comments
 (0)