From dececd1d6a7d801ad3fe8d7ae72c5e1ae7f77ec5 Mon Sep 17 00:00:00 2001 From: Tianyu Yao Date: Mon, 21 Oct 2024 21:11:16 -0700 Subject: [PATCH] Generate metadata for prefetchable pagination Reviewed By: captbaritone Differential Revision: D63917160 fbshipit-source-id: a1a8e19aee2e31ac0d2db76c049c90f3b438d502 --- .../fetchable_query_generator.rs | 4 ++++ .../src/refetchable_fragment/node_query_generator.rs | 4 ++++ .../refetchable_fragment/query_query_generator.rs | 2 ++ .../src/refetchable_fragment/utils.rs | 12 ++++++++++++ .../refetchable_fragment/viewer_query_generator.rs | 2 ++ ...t-edge-inline-fragment-no-type-condition.expected | 2 ++ .../fixtures/client-edge-inline-fragment.expected | 2 ++ .../fixtures/client-edge-variables.expected | 1 + .../fixtures/client-edge-with-required.expected | 1 + .../client-edge-within-non-client-edge.expected | 1 + .../tests/client_edges/fixtures/client-edge.expected | 1 + .../nested-client-edges-with-variables.expected | 2 ++ .../fixtures/nested-client-edges.expected | 2 ++ ...ace-which-implementations-implement-node.expected | 1 + .../fragment-on-interface-without-id.expected | 1 + .../fragment-on-node-interface-without-id.expected | 1 + .../fixtures/fragment-on-node-interface.expected | 1 + .../fragment-on-non-node-fetchable-type.expected | 1 + ...mplementing-node-interface-with-alias-id.expected | 1 + ...nt-on-object-implementing-node-interface.expected | 1 + .../fixtures/fragment-on-query-with-cycle.expected | 1 + .../fixtures/fragment-on-query.expected | 1 + .../fixtures/fragment-on-viewer.expected | 1 + ...gs-on-object-implementing-node-interface.expected | 1 + .../fixtures/fragment-with-args-on-query.expected | 1 + .../fixtures/fragment-with-args-on-viewer.expected | 1 + ...e-fragment-with-connection-bidirectional.expected | 1 + ...ble-fragment-with-connection-with-stream.expected | 1 + .../refetchable-fragment-with-connection.expected | 1 + ...terface-all-implementing-types-impl-node.expected | 1 + ...able-interface-but-no-implementing-types.expected | 1 + ...fetchable-interface-some-types-impl-node.expected | 1 + .../fixtures/refetchable-interface.expected | 2 ++ 33 files changed, 57 insertions(+) diff --git a/compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs b/compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs index 9924eedf4b4f1..04b9af3eae1bf 100644 --- a/compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs +++ b/compiler/crates/relay-transforms/src/refetchable_fragment/fetchable_query_generator.rs @@ -34,6 +34,7 @@ use super::build_fragment_metadata_as_directive; use super::build_fragment_spread; use super::build_operation_variable_definitions; use super::build_used_global_variables; +use super::uses_prefetchable_pagination_in_connection; use super::validation_message::ValidationMessage; use super::QueryGenerator; use super::RefetchRoot; @@ -78,6 +79,9 @@ fn build_refetch_operation( identifier_query_variable_name: schema_config .node_interface_id_variable_name, }), + is_prefetchable_pagination: uses_prefetchable_pagination_in_connection( + fragment, + ), }, ), selections: enforce_selections_with_id_field( diff --git a/compiler/crates/relay-transforms/src/refetchable_fragment/node_query_generator.rs b/compiler/crates/relay-transforms/src/refetchable_fragment/node_query_generator.rs index c83a4852d23cb..6c4f5bde4dd67 100644 --- a/compiler/crates/relay-transforms/src/refetchable_fragment/node_query_generator.rs +++ b/compiler/crates/relay-transforms/src/refetchable_fragment/node_query_generator.rs @@ -37,6 +37,7 @@ use super::build_fragment_metadata_as_directive; use super::build_fragment_spread; use super::build_operation_variable_definitions; use super::build_used_global_variables; +use super::uses_prefetchable_pagination_in_connection; use super::validation_message::ValidationMessage; use super::QueryGenerator; use super::RefetchRoot; @@ -124,6 +125,9 @@ fn build_refetch_operation( identifier_query_variable_name: schema_config .node_interface_id_variable_name, }), + is_prefetchable_pagination: uses_prefetchable_pagination_in_connection( + fragment, + ), }, ), used_global_variables: build_used_global_variables( diff --git a/compiler/crates/relay-transforms/src/refetchable_fragment/query_query_generator.rs b/compiler/crates/relay-transforms/src/refetchable_fragment/query_query_generator.rs index c57212723a43c..0186d29555441 100644 --- a/compiler/crates/relay-transforms/src/refetchable_fragment/query_query_generator.rs +++ b/compiler/crates/relay-transforms/src/refetchable_fragment/query_query_generator.rs @@ -18,6 +18,7 @@ use super::build_fragment_metadata_as_directive; use super::build_fragment_spread; use super::build_operation_variable_definitions; use super::build_used_global_variables; +use super::uses_prefetchable_pagination_in_connection; use super::QueryGenerator; use super::RefetchRoot; use super::RefetchableMetadata; @@ -42,6 +43,7 @@ fn build_refetch_operation( operation_name: query_name, path: vec![], identifier_info: None, + is_prefetchable_pagination: uses_prefetchable_pagination_in_connection(fragment), }, ), used_global_variables: build_used_global_variables( diff --git a/compiler/crates/relay-transforms/src/refetchable_fragment/utils.rs b/compiler/crates/relay-transforms/src/refetchable_fragment/utils.rs index fb57ad1f6d9a6..f4a94a4f63e1b 100644 --- a/compiler/crates/relay-transforms/src/refetchable_fragment/utils.rs +++ b/compiler/crates/relay-transforms/src/refetchable_fragment/utils.rs @@ -30,6 +30,7 @@ use intern::string_key::StringKey; use lazy_static::lazy_static; use super::validation_message::ValidationMessage; +use crate::extract_connection_metadata_from_directive; use crate::root_variables::VariableMap; #[derive(Clone, Debug, PartialEq, Eq, Hash)] @@ -43,6 +44,7 @@ pub struct RefetchableMetadata { pub operation_name: OperationDefinitionName, pub path: Vec, pub identifier_info: Option, + pub is_prefetchable_pagination: bool, } associated_data_impl!(RefetchableMetadata); @@ -144,6 +146,16 @@ pub fn build_fragment_metadata_as_directive( next_directives } +pub fn uses_prefetchable_pagination_in_connection(fragment: &FragmentDefinition) -> bool { + if let Some(metadatas) = extract_connection_metadata_from_directive(&fragment.directives) { + if metadatas.len() == 1 { + let metadata = &metadatas[0]; + return metadata.is_prefetchable_pagination; + } + } + false +} + /// Metadata attached to generated refetch queries storing the name of the /// fragment the operation was derived from. #[derive(Clone, Debug, PartialEq, Eq, Hash)] diff --git a/compiler/crates/relay-transforms/src/refetchable_fragment/viewer_query_generator.rs b/compiler/crates/relay-transforms/src/refetchable_fragment/viewer_query_generator.rs index 1179fc2e7c50a..b98d32187fea1 100644 --- a/compiler/crates/relay-transforms/src/refetchable_fragment/viewer_query_generator.rs +++ b/compiler/crates/relay-transforms/src/refetchable_fragment/viewer_query_generator.rs @@ -24,6 +24,7 @@ use super::build_fragment_metadata_as_directive; use super::build_fragment_spread; use super::build_operation_variable_definitions; use super::build_used_global_variables; +use super::uses_prefetchable_pagination_in_connection; use super::validation_message::ValidationMessage; use super::QueryGenerator; use super::RefetchRoot; @@ -51,6 +52,7 @@ fn build_refetch_operation( operation_name: query_name, path: vec![CONSTANTS.viewer_field_name], identifier_info: None, + is_prefetchable_pagination: uses_prefetchable_pagination_in_connection(fragment), }, ), used_global_variables: build_used_global_variables( diff --git a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-inline-fragment-no-type-condition.expected b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-inline-fragment-no-type-condition.expected index a42dfa401fc6e..08a7779c285da 100644 --- a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-inline-fragment-no-type-condition.expected +++ b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-inline-fragment-no-type-condition.expected @@ -110,6 +110,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend on User @__ClientEdgeGe # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { doesViewerLike @@ -141,6 +142,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend_1 on User @__ClientEdge # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { name diff --git a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-inline-fragment.expected b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-inline-fragment.expected index 6042b2bb054fe..18240bc4574d2 100644 --- a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-inline-fragment.expected +++ b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-inline-fragment.expected @@ -118,6 +118,7 @@ fragment RefetchableClientEdgeQuery_Foo_node_PhotoStory__author__best_friend on # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { name @@ -149,6 +150,7 @@ fragment RefetchableClientEdgeQuery_Foo_node_Story__author__best_friend on User # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { doesViewerLike diff --git a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-variables.expected b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-variables.expected index 65cf4b22b22bb..a3a16f6f254ec 100644 --- a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-variables.expected +++ b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-variables.expected @@ -73,6 +73,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend on User @__ClientEdgeGe # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { url(site: $site) diff --git a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-with-required.expected b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-with-required.expected index 7a550a3275701..596fe13d6b5b0 100644 --- a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-with-required.expected +++ b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-with-required.expected @@ -77,6 +77,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend on User @__ClientEdgeGe # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { name diff --git a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-within-non-client-edge.expected b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-within-non-client-edge.expected index 6f50995c36c34..5cfc76b0db944 100644 --- a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-within-non-client-edge.expected +++ b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge-within-non-client-edge.expected @@ -77,6 +77,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_nearest_neighbor__best_friend on Us # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { name diff --git a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge.expected b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge.expected index 8f68917b7fd2f..515a2f6e0db2d 100644 --- a/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge.expected +++ b/compiler/crates/relay-transforms/tests/client_edges/fixtures/client-edge.expected @@ -73,6 +73,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend on User @__ClientEdgeGe # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { name diff --git a/compiler/crates/relay-transforms/tests/client_edges/fixtures/nested-client-edges-with-variables.expected b/compiler/crates/relay-transforms/tests/client_edges/fixtures/nested-client-edges-with-variables.expected index 159da2a194bfe..94385c5dfe646 100644 --- a/compiler/crates/relay-transforms/tests/client_edges/fixtures/nested-client-edges-with-variables.expected +++ b/compiler/crates/relay-transforms/tests/client_edges/fixtures/nested-client-edges-with-variables.expected @@ -104,6 +104,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend on User @__ClientEdgeGe # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { url(site: $top_level_site) @@ -162,6 +163,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend__best_friend on User @_ # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { name diff --git a/compiler/crates/relay-transforms/tests/client_edges/fixtures/nested-client-edges.expected b/compiler/crates/relay-transforms/tests/client_edges/fixtures/nested-client-edges.expected index 897080a442a32..d0292135b81ba 100644 --- a/compiler/crates/relay-transforms/tests/client_edges/fixtures/nested-client-edges.expected +++ b/compiler/crates/relay-transforms/tests/client_edges/fixtures/nested-client-edges.expected @@ -100,6 +100,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend on User @__ClientEdgeGe # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { ... @__ClientEdgeMetadataDirective @@ -156,6 +157,7 @@ fragment RefetchableClientEdgeQuery_Foo_user_best_friend__best_friend on User @_ # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { name diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-interface-which-implementations-implement-node.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-interface-which-implementations-implement-node.expected index 3b47429b478f6..b8a1fa3c3e60d 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-interface-which-implementations-implement-node.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-interface-which-implementations-implement-node.expected @@ -49,6 +49,7 @@ fragment RefetchableFragment on Actor @refetchable(queryName: "RefetchableFragme # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-interface-without-id.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-interface-without-id.expected index e9cc99a3138ca..0bdfcba6e8d80 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-interface-without-id.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-interface-without-id.expected @@ -32,6 +32,7 @@ fragment RefetchableFragment on AllConcreteTypesImplementNode @refetchable(query # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { count diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-node-interface-without-id.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-node-interface-without-id.expected index 96227bdc60b02..0de78ec454282 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-node-interface-without-id.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-node-interface-without-id.expected @@ -48,6 +48,7 @@ fragment RefetchableFragment on Node @refetchable(queryName: "RefetchableFragmen # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { ... on User { diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-node-interface.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-node-interface.expected index 719edd1457366..b6f335a96919e 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-node-interface.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-node-interface.expected @@ -49,6 +49,7 @@ fragment RefetchableFragment on Node @refetchable(queryName: "RefetchableFragmen # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-non-node-fetchable-type.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-non-node-fetchable-type.expected index 672e971ecbd52..078a78736c942 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-non-node-fetchable-type.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-non-node-fetchable-type.expected @@ -47,6 +47,7 @@ fragment RefetchableFragment on NonNodeStory @refetchable(queryName: "Refetchabl # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { actor { diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-object-implementing-node-interface-with-alias-id.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-object-implementing-node-interface-with-alias-id.expected index 3e7a1933617d2..9c9748925930c 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-object-implementing-node-interface-with-alias-id.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-object-implementing-node-interface-with-alias-id.expected @@ -47,6 +47,7 @@ fragment RefetchableFragment on User @refetchable(queryName: "RefetchableFragmen # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { __id: id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-object-implementing-node-interface.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-object-implementing-node-interface.expected index 1b53815a0f20a..ee4d9e2eb73be 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-object-implementing-node-interface.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-object-implementing-node-interface.expected @@ -47,6 +47,7 @@ fragment RefetchableFragment on User @refetchable(queryName: "RefetchableFragmen # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-query-with-cycle.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-query-with-cycle.expected index 27799c67a20d0..b2ca21e06e870 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-query-with-cycle.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-query-with-cycle.expected @@ -69,6 +69,7 @@ fragment RefetchableFragment on Query @refetchable(queryName: "RefetchableFragme # ), # path: [], # identifier_info: None, +# is_prefetchable_pagination: false, # } { node(id: $id) { diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-query.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-query.expected index 7153d53d31403..463e848dee0bc 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-query.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-query.expected @@ -45,6 +45,7 @@ fragment RefetchableFragment on Query @refetchable(queryName: "RefetchableFragme # ), # path: [], # identifier_info: None, +# is_prefetchable_pagination: false, # } { node(id: $id) { diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-viewer.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-viewer.expected index 37dd9ffe8e551..b4856911c489a 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-viewer.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-on-viewer.expected @@ -43,6 +43,7 @@ fragment RefetchableFragment on Viewer @refetchable(queryName: "RefetchableFragm # "viewer", # ], # identifier_info: None, +# is_prefetchable_pagination: false, # } { actor { diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-object-implementing-node-interface.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-object-implementing-node-interface.expected index deb5551f00753..1532e736488f4 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-object-implementing-node-interface.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-object-implementing-node-interface.expected @@ -59,6 +59,7 @@ fragment RefetchableFragment on User @refetchable(queryName: "RefetchableFragmen # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-query.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-query.expected index 360dd792018e8..857d5d6f95e3f 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-query.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-query.expected @@ -55,6 +55,7 @@ fragment RefetchableFragment on Query @refetchable(queryName: "RefetchableFragme # ), # path: [], # identifier_info: None, +# is_prefetchable_pagination: false, # } { node(id: $id) { diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-viewer.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-viewer.expected index 1205eb4c93672..4a80613c434dd 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-viewer.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/fragment-with-args-on-viewer.expected @@ -55,6 +55,7 @@ fragment RefetchableFragment on Viewer @refetchable(queryName: "RefetchableFragm # "viewer", # ], # identifier_info: None, +# is_prefetchable_pagination: false, # } { actor { diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection-bidirectional.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection-bidirectional.expected index 404dab58099fe..05c47fee44fa1 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection-bidirectional.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection-bidirectional.expected @@ -85,6 +85,7 @@ fragment PaginationFragment on Node @refetchable(queryName: "RefetchableFragment # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection-with-stream.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection-with-stream.expected index 50977fcf486bf..8aa193d4a3a81 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection-with-stream.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection-with-stream.expected @@ -75,6 +75,7 @@ fragment PaginationFragment on Node @refetchable(queryName: "RefetchableFragment # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection.expected index 4ce5380660cc5..b80093a6ca1ee 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-fragment-with-connection.expected @@ -75,6 +75,7 @@ fragment PaginationFragment on Node @refetchable(queryName: "RefetchableFragment # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-all-implementing-types-impl-node.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-all-implementing-types-impl-node.expected index 30357a05c64a1..503fb2de7f312 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-all-implementing-types-impl-node.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-all-implementing-types-impl-node.expected @@ -46,6 +46,7 @@ fragment RefetchableFragment on RefetchableInterface @refetchable(queryName: "Re # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-but-no-implementing-types.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-but-no-implementing-types.expected index 835ea3078be14..b8974e7f3b0ed 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-but-no-implementing-types.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-but-no-implementing-types.expected @@ -43,6 +43,7 @@ fragment RefetchableFragmentFoo on RefetchableInterfaceFoo @refetchable(queryNam # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-some-types-impl-node.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-some-types-impl-node.expected index 2995e4f9dd26d..7f401fadbb1cc 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-some-types-impl-node.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface-some-types-impl-node.expected @@ -50,6 +50,7 @@ fragment RefetchableFragment on RefetchableInterface @refetchable(queryName: "Re # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id diff --git a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface.expected b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface.expected index 35264388f9240..3f1d6beab77ba 100644 --- a/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface.expected +++ b/compiler/crates/relay-transforms/tests/refetchable_fragment/fixtures/refetchable-interface.expected @@ -74,6 +74,7 @@ fragment RefetchableFragment on RefetchableInterface @refetchable(queryName: "Re # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { id @@ -94,6 +95,7 @@ fragment RefetchableFragment2 on RefetchableInterface2 @refetchable(queryName: " # identifier_query_variable_name: "id", # }, # ), +# is_prefetchable_pagination: false, # } { __typename