Skip to content

Commit

Permalink
Allow for enabling feature flag on a per test basis
Browse files Browse the repository at this point in the history
Summary: This diff follows up on a comment in the previous diff to allow the tests to turn on or off exec time resolvers on a per test basis by adding a comment to the test.

Reviewed By: lynnshaoyu

Differential Revision: D64769717

fbshipit-source-id: d96c06a21e9bbe4a6a4fa7996f9e4b2652314400
  • Loading branch information
evanyeung authored and facebook-github-bot committed Oct 29, 2024
1 parent d6cb5a2 commit b4d0b22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/crates/relay-codegen/tests/client_edges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ pub async fn transform_fixture(fixture: &Fixture<'_>) -> Result<String, String>
} else {
FeatureFlag::Disabled
};
let enable_exec_time_resolvers_directive = fixture
.content
.contains("# enable-exec-time-resolvers-directive");
let feature_flags = Arc::new(FeatureFlags {
relay_resolver_enable_interface_output_type,
enable_exec_time_resolvers_directive: true,
enable_exec_time_resolvers_directive,
..Default::default()
});
let project_config: ProjectConfig = ProjectConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
==================================== INPUT ====================================
# enable-exec-time-resolvers-directive

query Foo @exec_time_resolvers {
me {
pet {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# enable-exec-time-resolvers-directive

query Foo @exec_time_resolvers {
me {
pet {
Expand Down

0 comments on commit b4d0b22

Please sign in to comment.