Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
**/next-env.d.ts
**/*.d.ts
**/.DS_Store
**/.idea
**/.swc/**

# the built binary is downloaded into this folder during CI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ fn process_object_type_definition(
field: format!("node.as{}", object_type_definition.name.item)
.intern()
.into(),
limit_to: None,
},
parent_object_name: object_type_definition.name.item,
description: Description(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#[serde(default)]
pub field_map: Vec<FieldMapItem>,
pub field: StringLiteralValue,
pub limit_to: Option<Vec<StringLiteralValue>>,
}

pub fn create_new_exposed_field<TNetworkProtocol: NetworkProtocol>(
Expand All @@ -52,6 +53,7 @@
expose_as,
field_map,
field,
limit_to,

Check warning on line 56 in crates/isograph_schema/src/create_additional_fields/expose_field_directive.rs

View workflow job for this annotation

GitHub Actions / Build compiler (x86_64-unknown-linux-musl) / Build compiler

unused variable: `limit_to`

Check failure on line 56 in crates/isograph_schema/src/create_additional_fields/expose_field_directive.rs

View workflow job for this annotation

GitHub Actions / cargo clippy

unused variable: `limit_to`

Check failure on line 56 in crates/isograph_schema/src/create_additional_fields/expose_field_directive.rs

View workflow job for this annotation

GitHub Actions / Run cargo test (excluding relay tests)

unused variable: `limit_to`

Check failure on line 56 in crates/isograph_schema/src/create_additional_fields/expose_field_directive.rs

View workflow job for this annotation

GitHub Actions / Build fixtures / Run generate_isograph_fixtures

unused variable: `limit_to`

Check warning on line 56 in crates/isograph_schema/src/create_additional_fields/expose_field_directive.rs

View workflow job for this annotation

GitHub Actions / Build compiler (x86_64-apple-darwin, macos-latest, isograph_cli, isograph_cli-macos-x64) / Build compiler

unused variable: `limit_to`

Check warning on line 56 in crates/isograph_schema/src/create_additional_fields/expose_field_directive.rs

View workflow job for this annotation

GitHub Actions / Build compiler (x86_64-pc-windows-msvc, windows-latest, true, isograph_cli.exe, isograph_cli-bin-... / Build compiler

unused variable: `limit_to`

Check warning on line 56 in crates/isograph_schema/src/create_additional_fields/expose_field_directive.rs

View workflow job for this annotation

GitHub Actions / Build compiler (aarch64-unknown-linux-musl, ubuntu-latest, isograph_cli, isograph_cli-bin-linux-a... / Build compiler

unused variable: `limit_to`

Check warning on line 56 in crates/isograph_schema/src/create_additional_fields/expose_field_directive.rs

View workflow job for this annotation

GitHub Actions / Build compiler (aarch64-apple-darwin, macos-latest, isograph_cli, isograph_cli-macos-arm64) / Build compiler

unused variable: `limit_to`
} = &expose_field_to_insert.expose_field_directive;

// HACK: we're essentially splitting the field arg by . and keeping the same
Expand Down
3 changes: 3 additions & 0 deletions crates/tests/tests/directives_deserialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ fn test_test_mutation_extension_expose_as() -> Result<(), Box<dyn Error>> {
expose_as,
field_map,
field,
limit_to: None,
};

assert_eq!(expose_field_mutations[0], set_tagline_mutation);
Expand All @@ -72,6 +73,7 @@ fn test_test_mutation_extension_set_pet_tagline_parsing() -> Result<(), Box<dyn
expose_as: None,
field_map,
field,
limit_to: None,
};

assert_eq!(expose_field_mutations[0], set_tagline_mutation);
Expand All @@ -92,6 +94,7 @@ fn test_mutation_extension_set_pet_bestfriend_parsing() -> Result<(), Box<dyn Er
expose_as: None,
field_map,
field,
limit_to: None,
};
assert_eq!(expose_field_directives[1], set_pet_best_friend);
Ok(())
Expand Down
Loading