Crates.io | graphql-lint |
lib.rs | graphql-lint |
version | 0.1.3 |
source | src |
created_at | 2024-04-26 13:30:07.301919 |
updated_at | 2024-04-26 14:18:42.635067 |
description | A GraphQL SDL linter |
homepage | |
repository | https://github.com/grafbase/grafbase |
max_upload_size | |
id | 1221419 |
size | 31,403 |
graphql-lint
A Rust based linter for GraphQL SDL schemas.
graphql-lint
is used in the Grafbase Platform and CLI.
PascalCase
"Type"
"Type"
camelCase
camelCase
camelCase
camelCase
PascalCase
"Enum"
"Enum"
"Union"
"Union"
SCREAMING_SNAKE_CASE
"Interface"
"Interface"
["query", "get", "list"]
"Query"
["mutation", "put", "post", "patch"]
"Mutation"
"subscription"
"Subscription"
@deprecated
directive requires specifying the reason
argument[dependencies]
graphql-lint = "0.1.3"
use graphql_lint::lint;
fn main () {
let schema = r#"
type Query {
hello: String!
}
"#;
let violations = lint(schema).unwrap();
}