libgraphql_parser/graphql_error_note_kind.rs
1/// The kind of an error note (determines how the note is rendered).
2///
3/// Notes provide additional context beyond the primary error message.
4/// Different kinds are rendered with different prefixes in CLI output
5/// and may be handled differently by IDEs or other tools.
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum GraphQLErrorNoteKind {
8 /// General context or explanation about the error.
9 ///
10 /// Rendered as `= note: ...` in CLI output.
11 /// Example: "Opening `{` here" (with span pointing to the opener)
12 General,
13
14 /// Actionable suggestion for fixing the error.
15 ///
16 /// Rendered as `= help: ...` in CLI output.
17 /// Example: "Did you mean: `userName: String`?"
18 Help,
19
20 /// Reference to the GraphQL specification.
21 ///
22 /// Rendered as `= spec: ...` in CLI output.
23 /// Example: "https://spec.graphql.org/September2025/#FieldDefinition"
24 Spec,
25}