apollo-compiler@0.11.2
·
474 commits
to main
since this release
Features
-
Add
validate_standalone_executablefunction to validate an executable document without access to a schema, by goto-bus-stop in pull/631, issue/629This runs just those validations that can be done on operations without knowing the types of things.
let compiler = ApolloCompiler::new(); let file_id = compiler.add_executable(r#" { user { ...userData } } "#, "query.graphql"); let diagnostics = compiler.db.validate_standalone_executable(file_id); // Complains about `userData` fragment not existing, but does not complain about `user` being an unknown query.
Fixes
-
validate input value types, by goto-bus-stop in pull/642
This fixes an oversight in the validation rules implemented by
compiler.db.validate(). Previously, incorrect
types on input values and arguments were not reported:type ObjectType { id: ID! } input InputObject { # accepted in <= 0.11.1, reports "TypeThatDoesNotExist is not in scope" in 0.11.2 property: TypeThatDoesNotExist # accepted in <= 0.11.1, reports "ObjectType is not an input type" in 0.11.2 inputType: ObjectType }