Skip to content

Commit 7af40f7

Browse files
committed
fixes and added ci
1 parent b83db33 commit 7af40f7

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ jobs:
1818
uses: Swatinem/rust-cache@v1
1919

2020
- name: Test Rust
21-
run: cargo test
21+
run: |
22+
# features=graphql_parser_fork
23+
cargo test --features graphql_parser_fork --no-default-features
24+
# features=graphql_parser
25+
cargo test
2226
2327
- name: Build Rust
24-
run: cargo build --release
28+
run: |
29+
# features=graphql_parser_fork
30+
cargo build --release --features graphql_parser_fork --no-default-features
31+
# features=graphql_parser
32+
cargo build --release

src/ast/operation_transformer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ mod tests {
582582

583583
fn transform_field(
584584
&mut self,
585-
field: &graphql_parser::query::Field<'a, T>,
586-
) -> Transformed<graphql_parser::query::Selection<'a, T>> {
585+
field: &crate::parser::query::Field<'a, T>,
586+
) -> Transformed<crate::parser::query::Selection<'a, T>> {
587587
let selection_set = self.transform_selection_set(&field.selection_set);
588588
let arguments = self.transform_arguments(&field.arguments);
589589
let directives = self.transform_directives(&field.directives);

src/validation/test_utils.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub fn test_operation_without_schema<'a>(
249249
operation: &'a str,
250250
plan: &'a mut ValidationPlan,
251251
) -> Vec<ValidationError> {
252-
let schema_ast = graphql_parser::parse_schema(
252+
let schema_ast = crate::parser::parse_schema(
253253
"
254254
type Query {
255255
dummy: String
@@ -258,9 +258,7 @@ type Query {
258258
)
259259
.expect("Failed to parse schema");
260260

261-
let operation_ast = graphql_parser::parse_query(operation)
262-
.unwrap()
263-
.into_static();
261+
let operation_ast = crate::parser::parse_query(operation).unwrap().into_static();
264262

265263
validate(&schema_ast, &operation_ast, plan)
266264
}
@@ -277,11 +275,9 @@ pub fn test_operation_with_schema<'a>(
277275
plan: &'a ValidationPlan,
278276
) -> Vec<ValidationError> {
279277
let schema_clone = string_to_static_str(schema.to_string() + INTROSPECTION_SCHEMA);
280-
let schema_ast = graphql_parser::parse_schema(schema_clone).expect("Failed to parse schema");
278+
let schema_ast = crate::parser::parse_schema(schema_clone).expect("Failed to parse schema");
281279

282-
let operation_ast = graphql_parser::parse_query(operation)
283-
.unwrap()
284-
.into_static();
280+
let operation_ast = crate::parser::parse_query(operation).unwrap().into_static();
285281

286282
validate(&schema_ast, &operation_ast, plan)
287283
}

0 commit comments

Comments
 (0)