Skip to content

Commit d46b3be

Browse files
committed
Describe what with_analyzer checks in the README
with_analyzer parses the schema and query; it does not check the query against the schema. Say so, and note that analyze can also fail when it cannot select an operation in the query.
1 parent ac79318 commit d46b3be

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ Profiling is not available in batch mode.
7474
## Library usage
7575

7676
To compute scale factors for many inputs, use
77-
`bluejay_schema_analyzer::BluejaySchemaAnalyzer::with_analyzer`. It parses and
78-
validates the schema and query once, then calls your closure with an `analyze`
79-
function that returns the scale factor for one input:
77+
`bluejay_schema_analyzer::BluejaySchemaAnalyzer::with_analyzer`. It parses the
78+
schema and query once, then calls your closure with an `analyze` function that
79+
returns the scale factor for one input:
8080

8181
```rust
8282
use function_runner::bluejay_schema_analyzer::BluejaySchemaAnalyzer;
@@ -90,9 +90,12 @@ let scale_factors = BluejaySchemaAnalyzer::with_analyzer(
9090
)??;
9191
```
9292

93-
The outer `Result` holds schema and query errors. The inner `Result` holds
94-
analysis errors for an input. The `test_with_analyzer_analyzes_many_inputs`
95-
test in `src/bluejay_schema_analyzer.rs` runs this pattern.
93+
The outer `Result` holds schema and query parse errors. The inner `Result`
94+
holds analysis errors for an input, for example when `analyze` cannot select
95+
an operation in the query. `with_analyzer` does not check the query against
96+
the schema, so a query with an unknown field still parses. The
97+
`test_with_analyzer_analyzes_many_inputs` test in
98+
`src/bluejay_schema_analyzer.rs` runs this pattern.
9699

97100
## Development
98101

0 commit comments

Comments
 (0)