From 4caa22f16e61e3663473519c404d72f1d8535895 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:31:40 +0200 Subject: [PATCH 1/6] wip --- .../GraphQLQueryBenchmark.cs | 26 +- ...ayBuilderExtensions.SourceSchemaClients.cs | 16 +- .../Clients/SourceSchemaClientCapabilities.cs | 20 +- .../Clients/SourceSchemaHttpClient.cs | 117 ++- .../SourceSchemaHttpClientBatchingMode.cs | 10 - .../SourceSchemaHttpClientConfiguration.cs | 48 +- .../Execution/FusionRequestExecutorManager.cs | 215 +++--- .../Fusion.AspNetCore.Tests/BookStoreTests.cs | 2 +- .../FusionTestBase.CreateSourceSchema.cs | 28 +- .../FusionTestBase.MatchSnapshot.cs | 52 +- .../Fusion.AspNetCore.Tests/FusionTestBase.cs | 30 +- .../Fusion.AspNetCore.Tests/LookupTests.cs | 539 -------------- .../SourceSchemaClientCapabilitiesTests.cs | 671 ++++++++++++++++++ .../AbstractTypeTests.Abstract_Type.yaml | 1 + ...stract_Type_Direct_Source_Schema_Call.yaml | 1 + ...ts.Abstract_Type_With_Abstract_Lookup.yaml | 2 + ...ts.Abstract_Type_With_Concrete_Lookup.yaml | 2 + ...ts.Concrete_Type_With_Abstract_Lookup.yaml | 2 + ...ype_Refinements_With_Concrete_Lookups.yaml | 2 + ...ookups_And_Field_From_Specific_Source.yaml | 2 + ...ype_Refinements_With_Interface_Lookup.yaml | 2 + ...Lookup_And_Field_From_Specific_Source.yaml | 2 + ...tractTypeTests.List_Of_Abstract_Types.yaml | 1 + ...Type_Refinements_And_Concrete_Lookups.yaml | 2 + ...s_With_Additional_Concrete_Dependency.yaml | 3 + ...ith_Type_Refinements_And_Union_Lookup.yaml | 2 + ...p_With_Additional_Concrete_Dependency.yaml | 3 + ...Tests.Handle_Any_Scalar_ComplexNested.yaml | 1 + ...AnyScalarTests.Handle_Any_Scalar_List.yaml | 1 + ...Tests.Handle_Any_Scalar_ListOfObjects.yaml | 1 + ...rTests.Handle_Any_Scalar_NestedObject.yaml | 1 + ...alarTests.Handle_Any_Scalar_NullValue.yaml | 1 + ...yScalarTests.Handle_Any_Scalar_Object.yaml | 1 + ...sts.Handle_Any_Scalar_ObjectWithLists.yaml | 1 + ...rTests.Handle_Any_Scalar_SimpleValues.yaml | 1 + ...s.Ensure_String_Literals_Can_Be_Empty.yaml | 1 + ....Ensure_String_Variables_Can_Be_Empty.yaml | 1 + ...reTests.Fetch_Book_From_SourceSchema1.yaml | 1 + ...Schema1_And_Author_From_SourceSchema2.yaml | 2 + ..._Book_From_SourceSchema1_Two_Requests.yaml | 1 + ...chema1_And_Authors_From_SourceSchema2.yaml | 2 + ...ks_With_Requirements_To_SourceSchema1.yaml | 2 + ...irements_To_SourceSchema1_Three_Times.yaml | 2 + ...Requirements_To_SourceSchema1_X_Times.yaml | 2 + ...ks_With_Variable_First_And_First_Is_1.yaml | 2 + ...With_Variable_First_And_First_Omitted.yaml | 2 + ...rst_Last_And_First_1_And_Last_Omitted.yaml | 2 + ...Source_Schema_Hits_HttpClient_Timeout.yaml | 1 + ...Http_Request_In_Node_Is_Still_Ongoing.yaml | 1 + ...ections_On_A_Field_Statically_Skipped.yaml | 1 + ..._Around_Fields_Fetched_Through_Lookup.yaml | 1 + ...ough_Lookup_And_On_Same_Source_Schema.yaml | 1 + ...eld_With_Requirement_With_Other_Field.yaml | 1 + ..._Around_Fields_Fetched_Through_Lookup.yaml | 1 + ...ip_Not_Only_On_Field_With_Requirement.yaml | 2 + ..._Skip_On_Field_Fetched_Through_Lookup.yaml | 1 + ...Lookup_Skip_On_Field_With_Requirement.yaml | 1 + ...Field_Of_Field_Fetched_Through_Lookup.yaml | 1 + ...On_Some_Fields_Fetched_Through_Lookup.yaml | 2 + ...Skip_Around_Interface_Type_Refinement.yaml | 1 + ...Skip_Around_Multiple_Type_Refinements.yaml | 1 + ...deField_Skip_Around_Shared_Selections.yaml | 1 + ...NodeField_Skip_On_Interface_Selection.yaml | 1 + ...inement_With_Same_Unskipped_Selection.yaml | 2 + ...eld_Skip_On_Interface_Type_Refinement.yaml | 1 + ..._Skip_On_Selection_In_Type_Refinement.yaml | 1 + ...ts.NodeField_Skip_On_Shared_Selection.yaml | 1 + ...sts.NodeField_Skip_On_Type_Refinement.yaml | 1 + ..._Fields_From_Different_Source_Schemas.yaml | 1 + ..._On_Some_Fields_Of_Same_Source_Schema.yaml | 1 + ...evels_Around_Fields_Below_Entry_Field.yaml | 1 + ...dPath_Skip_On_Field_Below_Entry_Field.yaml | 2 + .../FileUploadTests.Upload_List_Of_Files.yaml | 1 + ....Upload_List_Of_Files_In_Input_Object.yaml | 1 + ..._List_Of_Files_In_Input_Object_Inline.yaml | 1 + .../FileUploadTests.Upload_Single_File.yaml | 1 + ...ts.Upload_Single_File_In_Input_Object.yaml | 1 + ...ad_Single_File_In_Input_Object_Inline.yaml | 1 + ...nTests.Concrete_Type_Branch_Requested.yaml | 2 + ...Type_Branch_Requested_Abstract_Lookup.yaml | 1 + ...om_Concrete_Type_Selections_Requested.yaml | 1 + ...Lookup_On_Best_Matching_Source_Schema.yaml | 161 ----- ...eld_Alongside_Regular_Root_Selections.yaml | 2 + ...de_Field_Concrete_Type_Has_Dependency.yaml | 2 + ...oncrete_Type_Selection_Has_Dependency.yaml | 2 + ...ts.Node_Field_Selections_On_Interface.yaml | 1 + ...ctions_On_Interface_And_Concrete_Type.yaml | 1 + ...Type_Both_Have_Different_Dependencies.yaml | 3 + ...ncrete_Type_Both_Have_Same_Dependency.yaml | 3 + ...On_Interface_Selection_Has_Dependency.yaml | 2 + ...elections_Have_Different_Dependencies.yaml | 2 + ...Types_Selections_Have_Same_Dependency.yaml | 2 + ...onTests.Only_Id_And_Typename_Selected.yaml | 1 + ...ly_TypeName_Selected_On_Concrete_Type.yaml | 1 + ...ificationTests.Only_Typename_Selected.yaml | 1 + ...ationTests.Two_Node_Fields_With_Alias.yaml | 3 + ...e_Value_When_Accessible_Value_Is_Used.yaml | 1 + ..._Inaccessible_Argument_Can_Be_Queried.yaml | 1 + ...le_Fields_Can_Be_Used_As_Requirements.yaml | 2 + ...Field_When_Accessible_Field_Is_Passed.yaml | 1 + ...tionTests.Recursive_Input_Object_Type.yaml | 1 + .../InterfaceTests.Interface_Field.yaml | 1 + ...ceTests.Interface_Field_Concrete_Type.yaml | 1 + ...ete_Type_Linked_Field_With_Dependency.yaml | 2 + ...e_Field_Concrete_Type_With_Dependency.yaml | 2 + ...ce_Field_Linked_Field_With_Dependency.yaml | 2 + ..._Different_Selection_In_Concrete_Type.yaml | 2 + ...dency_Same_Selection_In_Concrete_Type.yaml | 2 + ...Refinements_Exclusive_To_Other_Schema.yaml | 1 + ..._Only_Type_Refinements_On_Same_Schema.yaml | 1 + ...Refinements_Exclusive_To_Other_Schema.yaml | 1 + .../InterfaceTests.Interface_List_Field.yaml | 1 + ...ts.Interface_List_Field_Concrete_Type.yaml | 1 + ...ete_Type_Linked_Field_With_Dependency.yaml | 2 + ...t_Field_Concrete_Type_With_Dependency.yaml | 2 + ...st_Field_Linked_Field_With_Dependency.yaml | 2 + ..._Different_Selection_In_Concrete_Type.yaml | 2 + ...dency_Same_Selection_In_Concrete_Type.yaml | 2 + ...terface_Object_Property_Concrete_Type.yaml | 1 + ...ete_Type_Linked_Field_With_Dependency.yaml | 2 + ...roperty_Concrete_Type_With_Dependency.yaml | 2 + ...Property_Linked_Field_With_Dependency.yaml | 2 + ..._Different_Selection_In_Concrete_Type.yaml | 2 + ...dency_Same_Selection_In_Concrete_Type.yaml | 2 + ...IntrospectionTests.Typename_On_Object.yaml | 1 + ...onTests.Typename_On_Object_With_Alias.yaml | 1 + ...n_Resolve_Field_From_Another_Subgraph.yaml | 2 + ...sts.Fetch_From_Nested_Internal_Lookup.yaml | 2 + ...ookupTests.Fetch_OneOf_Lookup_With_Id.yaml | 2 + ...kupTests.Fetch_OneOf_Lookup_With_Name.yaml | 2 + ...With_ApolloRequestBatching_JsonArray.yaml} | 4 +- ...With_ApolloRequestBatching_JsonLines.yaml} | 4 +- ...estBatching_JsonLines_Large_Response.yaml} | 4 +- ...Fetch_With_ApolloRequestBatching_SSE.yaml} | 4 +- ...loRequestBatching_SSE_Large_Response.yaml} | 4 +- ...est_Batching_JsonArray_Large_Response.yaml | 2 + .../MutationTests.Multiple_Mutation.yaml | 3 + .../MutationTests.Single_Mutation.yaml | 2 + ...on_Error_For_NonNull_Field_Being_Null.yaml | 61 -- ...quireTests.Require_Enumerable_In_List.yaml | 2 + ...RequireTests.Require_Object_In_A_List.yaml | 3 + ...equireTests.Requirement_On_Leaf_Field.yaml | 3 + ...On_Nullable_Leaf_Field_Returning_Null.yaml | 3 + ...nt_On_Property_Within_Nullable_Object.yaml | 3 + ...Within_Nullable_Object_Returning_Null.yaml | 3 + ...e_Under_Inline_Fragment_Pockets_Error.yaml | 2 + ...e_Name_Should_Not_Drop_Pocketed_Error.yaml | 1 + ..._Propagates_To_Parent_On_Post_Process.yaml | 2 + ...Nullable_Children_Pockets_Child_Error.yaml | 2 + ...e_Children_Does_Not_Initialize_Parent.yaml | 2 + ...Promotes_One_Pocketed_Error_To_Parent.yaml | 2 + ..._Parent_Fields_Below_Type_With_Lookup.yaml | 2 + ...kup_With_Extra_Fields_On_Shared_Level.yaml | 2 + ...up_With_Extra_Fields_On_Shared_Levels.yaml | 2 + ...Tests.Hierarchy_Of_Shared_Root_Fields.yaml | 2 + ...lds_With_Extra_Fields_On_Shared_Level.yaml | 3 + ...d_Parent_Field_Below_Type_With_Lookup.yaml | 2 + ...kup_With_Extra_Fields_On_Shared_Level.yaml | 2 + ...Type_With_Lookup_With_Type_Refinement.yaml | 2 + ...rface_Root_Field_With_Type_Refinement.yaml | 2 + ...redPathTests.Single_Shared_Root_Field.yaml | 2 + ..._Root_Field_With_Extra_Fields_On_Root.yaml | 2 + ...Inline_Fragment_Without_TypeCondition.yaml | 2 + ...Union_Root_Field_With_Type_Refinement.yaml | 2 + ..._Source_Schema_Are_Properly_Forwarded.yaml | 1 + ..._On_Lookup_Field_In_List_OnError_Null.yaml | 2 + ...ookup_Field_In_List_OnError_Propagate.yaml | 2 + ...ts.Error_On_Lookup_Field_OnError_Null.yaml | 2 + ...ror_On_Lookup_Field_OnError_Propagate.yaml | 2 + ...kup_Leaf_In_List_NonNull_OnError_Null.yaml | 2 + ...eaf_In_List_NonNull_OnError_Propagate.yaml | 2 + ...r_On_Lookup_Leaf_In_List_OnError_Null.yaml | 2 + ...Lookup_Leaf_In_List_OnError_Propagate.yaml | 2 + ...r_On_Lookup_Leaf_NonNull_OnError_Null.yaml | 2 + ...Lookup_Leaf_NonNull_OnError_Propagate.yaml | 2 + ...sts.Error_On_Lookup_Leaf_OnError_Null.yaml | 2 + ...rror_On_Lookup_Leaf_OnError_Propagate.yaml | 2 + ...ests.Error_On_Root_Field_OnError_Null.yaml | 1 + ...Error_On_Root_Field_OnError_Propagate.yaml | 1 + ...Tests.Error_On_Root_Leaf_OnError_Null.yaml | 1 + ....Error_On_Root_Leaf_OnError_Propagate.yaml | 1 + ...For_Lookup_Field_NonNull_OnError_Null.yaml | 2 + ...ookup_Field_NonNull_OnError_Propagate.yaml | 2 + ..._For_Lookup_Leaf_NonNull_OnError_Null.yaml | 2 + ...Lookup_Leaf_NonNull_OnError_Propagate.yaml | 2 + ...h_For_Root_Field_NonNull_OnError_Null.yaml | 1 + ..._Root_Field_NonNull_OnError_Propagate.yaml | 1 + ...For_Lookup_Field_NonNull_OnError_Null.yaml | 2 + ...ookup_Field_NonNull_OnError_Propagate.yaml | 2 + ...h_For_Root_Field_NonNull_OnError_Null.yaml | 1 + ..._Root_Field_NonNull_OnError_Propagate.yaml | 1 + ...hout_Path_For_Root_Field_OnError_Null.yaml | 1 + ...Path_For_Root_Field_OnError_Propagate.yaml | 1 + ...Null_AppliesWithoutPerRequestOverride.yaml | 1 + ...Fails_For_Lookup_NonNull_OnError_Null.yaml | 2 + ..._For_Lookup_NonNull_OnError_Propagate.yaml | 2 + ...Request_Fails_For_Lookup_OnError_Null.yaml | 2 + ...st_Fails_For_Lookup_OnError_Propagate.yaml | 2 + ...r_Lookup_On_List_NonNull_OnError_Null.yaml | 2 + ...kup_On_List_NonNull_OnError_Propagate.yaml | 2 + ...Fails_For_Lookup_On_List_OnError_Null.yaml | 2 + ..._For_Lookup_On_List_OnError_Propagate.yaml | 2 + ...s_For_Root_Field_NonNull_OnError_Null.yaml | 1 + ..._Root_Field_NonNull_OnError_Propagate.yaml | 1 + ...est_Fails_For_Root_Field_OnError_Null.yaml | 1 + ...ails_For_Root_Field_OnError_Propagate.yaml | 1 + ...nsOverHttpStoreTests.Subscribe_Simple.yaml | 2 + ...on_Field_Concrete_Type_Has_Dependency.yaml | 2 + ...oncrete_Type_Selection_Has_Dependency.yaml | 2 + ...ions_Have_Dependency_To_Same_Subgraph.yaml | 2 + ..._Type_Selections_Have_Same_Dependency.yaml | 2 + ...ion_List_Concrete_Type_Has_Dependency.yaml | 2 + ...oncrete_Type_Selection_Has_Dependency.yaml | 3 + ...ions_Have_Dependency_To_Same_Subgraph.yaml | 2 + ..._Type_Selections_Have_Same_Dependency.yaml | 2 + ...on_Field_Concrete_Type_Has_Dependency.yaml | 2 + ...oncrete_Type_Selection_Has_Dependency.yaml | 2 + ...ions_Have_Dependency_To_Same_Subgraph.yaml | 2 + ..._Type_Selections_Have_Same_Dependency.yaml | 2 + ...ts.Union_Field_Just_Typename_Selected.yaml | 1 + ...ion_List_Concrete_Type_Has_Dependency.yaml | 2 + ...oncrete_Type_Selection_Has_Dependency.yaml | 3 + ...ions_Have_Dependency_To_Same_Subgraph.yaml | 2 + ..._Type_Selections_Have_Same_Dependency.yaml | 2 + ...sing_NonNull_Field_With_Default_Value.yaml | 1 + ...ts.InputObject_Missing_Nullable_Field.yaml | 1 + ...nTests.OneOf_Only_One_Option_Provided.yaml | 1 + ...iableCoercionTests.String_With_Quotes.yaml | 1 + ..._And_Reviews_And_Products_AutoCompose.yaml | 3 + ...eviews_And_Products_Query_TopProducts.yaml | 3 + ...d_Reviews_And_Products_Query_TypeName.yaml | 2 + ...d_Reviews_And_Products_With_Variables.yaml | 1 + ...Tests.Authors_And_Reviews_AutoCompose.yaml | 2 + ...ts.Authors_And_Reviews_Batch_Requests.yaml | 2 + ...Authors_And_Reviews_Query_GetUserById.yaml | 1 + ...ery_GetUserById_With_Invalid_Id_Value.yaml | 1 + ...hors_And_Reviews_Query_GetUserReviews.yaml | 3 + ...iews_Query_GetUserReviews_Skip_Author.yaml | 2 + ...GetUserReviews_Skip_Author_ErrorField.yaml | 3 + ...Authors_And_Reviews_Query_ReviewsUser.yaml | 4 + ...onState_With_Multiple_Variable_Values.yaml | 4 + ...ariable_Values_And_Forwarded_Variable.yaml | 4 + ...tiple_Variable_Values_Some_Items_Null.yaml | 4 + ...ationTests.Fetch_User_With_Node_Field.yaml | 1 + ...er_With_Node_Field_From_Two_Subgraphs.yaml | 2 + ...ser_With_Node_Field_Pass_In_Review_Id.yaml | 1 + ...ubgraph_Type_Of_Shared_Field_Not_Node.yaml | 2 + ...graph_Type_Of_Shared_Field_Not_Node_2.yaml | 2 + ...graph_Type_Of_Shared_Field_Not_Node_3.yaml | 2 + ...onTests.Forward_Nested_Node_Variables.yaml | 1 + ...Tests.Forward_Nested_Object_Variables.yaml | 1 + ...grationTests.Forward_Nested_Variables.yaml | 1 + ...ts.Forward_Nested_Variables_No_OpName.yaml | 1 + ...ariables_No_OpName_Two_RootSelections.yaml | 1 + ...ionTests.GetFirstPage_With_After_Null.yaml | 1 + ...llel_Multiple_SubGraphs_WithArguments.yaml | 3 + ...egrationTests.Require_Data_In_Context.yaml | 4 + ...rationTests.Require_Data_In_Context_2.yaml | 3 + ...rationTests.Require_Data_In_Context_3.yaml | 5 + ...at_Require_Data_From_Another_Subgraph.yaml | 2 + ...at_Require_Data_From_Another_Subgraph.yaml | 2 + ..._Containing_More_Selections_Is_Chosen.yaml | 2 + ...oes_Not_Duplicate_Forwarded_Variables.yaml | 1 + ...a_Is_Available_In_Resolvable_Subgraph.yaml | 2 + .../DemoIntegrationTests.Viewer_Bug_1.yaml | 2 + .../DemoIntegrationTests.Viewer_Bug_2.yaml | 2 + .../DemoIntegrationTests.Viewer_Bug_3.yaml | 3 + ...NonNull_One_Service_Errors_EntryField.yaml | 2 + ...ullable_One_Service_Errors_EntryField.yaml | 2 + ...d_NonNull_One_Service_Errors_SubField.yaml | 2 + ..._Nullable_One_Service_Errors_SubField.yaml | 2 + ..._Nullable_One_Service_Errors_SubField.yaml | 2 + ...NonNull_One_Service_Errors_EntryField.yaml | 2 + ...t_NonNull_One_Service_Errors_SubField.yaml | 2 + ...ullable_One_Service_Errors_EntryField.yaml | 2 + ..._Nullable_One_Service_Errors_SubField.yaml | 2 + ...ullable_One_Service_Errors_EntryField.yaml | 2 + ..._Nullable_One_Service_Errors_SubField.yaml | 2 + ...e_Service_Offline_EntryField_Nullable.yaml | 1 + ...ices_Offline_SharedEntryField_NonNull.yaml | 2 + ...e_Service_Offline_EntryFields_NonNull.yaml | 2 + ..._Service_Offline_EntryFields_Nullable.yaml | 2 + ...le_Service_Offline_EntryField_NonNull.yaml | 1 + ...e_Service_Offline_EntryField_Nullable.yaml | 1 + ...st_Service_Offline_EntryField_NonNull.yaml | 1 + ...t_Service_Offline_EntryField_Nullable.yaml | 1 + ...fline_SubField_NonNull_Parent_NonNull.yaml | 2 + ...line_SubField_NonNull_Parent_Nullable.yaml | 2 + ...ine_SubField_Nullable_Parent_Nullable.yaml | 2 + .../Demo.Catalog.Tests.csproj | 1 + 290 files changed, 1430 insertions(+), 1057 deletions(-) delete mode 100644 src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClientBatchingMode.cs create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs delete mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.No_By_Id_Lookup_On_Best_Matching_Source_Schema.yaml rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{LookupTests.Fetch_With_Request_Batching_JsonArray.yaml => LookupTests.Fetch_With_ApolloRequestBatching_JsonArray.yaml} (92%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{LookupTests.Fetch_With_Request_Batching_JsonLines.yaml => LookupTests.Fetch_With_ApolloRequestBatching_JsonLines.yaml} (94%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{LookupTests.Fetch_With_Request_Batching_JsonLines_Large_Response.yaml => LookupTests.Fetch_With_ApolloRequestBatching_JsonLines_Large_Response.yaml} (99%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{LookupTests.Fetch_With_Request_Batching_SSE.yaml => LookupTests.Fetch_With_ApolloRequestBatching_SSE.yaml} (94%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{LookupTests.Fetch_With_Request_Batching_SSE_Large_Response.yaml => LookupTests.Fetch_With_ApolloRequestBatching_SSE_Large_Response.yaml} (99%) delete mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/NullTests.Raise_NonNullViolation_Error_For_NonNull_Field_Being_Null.yaml diff --git a/src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs b/src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs index 7f17a46a73a..df224fab621 100644 --- a/src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs +++ b/src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs @@ -14,6 +14,8 @@ using BenchmarkDotNet.Exporters.Csv; using BenchmarkDotNet.Exporters; using HotChocolate.Buffers; +using HotChocolate.Fusion; +using HotChocolate.Fusion.Execution; namespace Fusion.Execution.Benchmarks; @@ -49,14 +51,28 @@ public async Task GlobalSetup() (_server, _app) = await GraphQLServerHelper.CreateTestServer(); _client = _server.CreateClient(); - var items = new HotChocolate.Transport.OperationRequest("{ items }"); - var fewItems = new HotChocolate.Transport.OperationRequest("{ fewItems }"); - + var fusionItems = new HotChocolate.Fusion.Transport.OperationRequest( + "{ items }", + id: null, + operationName: null, + onError: null, + variables: VariableValues.Empty, + extensions: JsonSegment.Empty); + var fusionFewItems = new HotChocolate.Fusion.Transport.OperationRequest( + "{ fewItems }", + id: null, + operationName: null, + onError: null, + variables: VariableValues.Empty, + extensions: JsonSegment.Empty); - _fusionItemsRequest = new FusionGraphQLHttpRequest(items, _requestUri); - _fusionFewItemsRequest = new FusionGraphQLHttpRequest(fewItems, _requestUri); + _fusionItemsRequest = new FusionGraphQLHttpRequest(fusionItems, _requestUri); + _fusionFewItemsRequest = new FusionGraphQLHttpRequest(fusionFewItems, _requestUri); _fusionClient = new FusionClient(_client); + var items = new HotChocolate.Transport.OperationRequest("{ items }"); + var fewItems = new HotChocolate.Transport.OperationRequest("{ fewItems }"); + _transportItemsRequest = new TransportGraphQLHttpRequest(items, _requestUri); _transportFewItemsRequest = new TransportGraphQLHttpRequest(fewItems, _requestUri); _transportClient = new TransportClient(_client); diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/DependencyInjection/CoreFusionGatewayBuilderExtensions.SourceSchemaClients.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/DependencyInjection/CoreFusionGatewayBuilderExtensions.SourceSchemaClients.cs index b97078cf6dd..83496a8ae7b 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/DependencyInjection/CoreFusionGatewayBuilderExtensions.SourceSchemaClients.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/DependencyInjection/CoreFusionGatewayBuilderExtensions.SourceSchemaClients.cs @@ -24,8 +24,8 @@ public static partial class CoreFusionGatewayBuilderExtensions /// /// The supported operations. /// - /// - /// The batching mode. + /// + /// The client capabilities. /// /// /// The Accept header values sent in case of a single, non-Subscription GraphQL request. @@ -53,7 +53,7 @@ public static IFusionGatewayBuilder AddHttpClientConfiguration( string name, Uri baseAddress, SupportedOperationType supportedOperations = SupportedOperationType.All, - SourceSchemaHttpClientBatchingMode batchingMode = SourceSchemaHttpClientBatchingMode.VariableBatching, + SourceSchemaClientCapabilities? capabilities = null, ImmutableArray? defaultAcceptHeaderValues = null, ImmutableArray? batchingAcceptHeaderValues = null, ImmutableArray? subscriptionAcceptHeaderValues = null, @@ -66,7 +66,7 @@ public static IFusionGatewayBuilder AddHttpClientConfiguration( name, baseAddress, supportedOperations, - batchingMode, + capabilities, defaultAcceptHeaderValues, batchingAcceptHeaderValues, subscriptionAcceptHeaderValues, @@ -92,8 +92,8 @@ public static IFusionGatewayBuilder AddHttpClientConfiguration( /// /// The supported operations. /// - /// - /// The batching mode. + /// + /// The client capabilities. /// /// /// The Accept header values sent in case of a single, non-Subscription GraphQL request. @@ -122,7 +122,7 @@ public static IFusionGatewayBuilder AddHttpClientConfiguration( string httpClientName, Uri baseAddress, SupportedOperationType supportedOperations = SupportedOperationType.All, - SourceSchemaHttpClientBatchingMode batchingMode = SourceSchemaHttpClientBatchingMode.VariableBatching, + SourceSchemaClientCapabilities? capabilities = null, ImmutableArray? defaultAcceptHeaderValues = null, ImmutableArray? batchingAcceptHeaderValues = null, ImmutableArray? subscriptionAcceptHeaderValues = null, @@ -142,7 +142,7 @@ public static IFusionGatewayBuilder AddHttpClientConfiguration( httpClientName, baseAddress, supportedOperations, - batchingMode, + capabilities, defaultAcceptHeaderValues, batchingAcceptHeaderValues, subscriptionAcceptHeaderValues, diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaClientCapabilities.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaClientCapabilities.cs index 9553654e0e6..226ae8e52db 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaClientCapabilities.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaClientCapabilities.cs @@ -8,28 +8,24 @@ namespace HotChocolate.Fusion.Execution.Clients; [Flags] public enum SourceSchemaClientCapabilities { + None = 0, + /// /// The client supports variable batching, where a single request carries multiple /// sets of variables so the downstream service can resolve them in one round-trip. /// - VariableBatching = 1, + VariableBatching = 1 << 1, /// /// The client supports request batching, where multiple independent GraphQL /// operations are sent as an array in a single HTTP request. /// - RequestBatching = 2, + RequestBatching = 1 << 2, /// - /// The client supports the Apollo-style request batching format, which uses a - /// JSON array of operation objects as the request body. - /// - ApolloRequestBatching = 4, - - /// - /// The client supports file upload via the - /// - /// GraphQL multipart request specification. + /// The client supports the Apollo-style request batching format, where multiple independent GraphQL + /// operations are sent as an array in a single HTTP request. + /// The server returns an in-order JSON array of responses. /// - FileUpload = 8 + ApolloRequestBatching = 1 << 3 } diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs index 25b10685aad..7b8aab36e9c 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs @@ -14,10 +14,12 @@ namespace HotChocolate.Fusion.Execution.Clients; +// TODO: I don't like that everything has branched paths for when callback is specified + /// /// HTTP-based implementation of that sends GraphQL operations /// to a downstream service over HTTP. Supports single requests, Apollo-style request batching, -/// and variable batching depending on the configured . +/// and variable batching depending on the configured . /// public sealed class SourceSchemaHttpClient : ISourceSchemaClient { @@ -44,24 +46,7 @@ public SourceSchemaHttpClient( _client = client; _configuration = configuration; - var capabilities = SourceSchemaClientCapabilities.FileUpload; - - if (configuration.BatchingMode.HasFlag(SourceSchemaHttpClientBatchingMode.VariableBatching)) - { - capabilities |= SourceSchemaClientCapabilities.VariableBatching; - } - - if (configuration.BatchingMode.HasFlag(SourceSchemaHttpClientBatchingMode.RequestBatching)) - { - capabilities |= SourceSchemaClientCapabilities.RequestBatching; - } - - if (configuration.BatchingMode.HasFlag(SourceSchemaHttpClientBatchingMode.ApolloRequestBatching)) - { - capabilities |= SourceSchemaClientCapabilities.ApolloRequestBatching; - } - - Capabilities = capabilities; + Capabilities = configuration.Capabilities; } /// @@ -354,22 +339,22 @@ private GraphQLHttpRequest CreateHttpRequest( break; default: - if (originalRequest.RequiresFileUpload - || _configuration.BatchingMode == SourceSchemaHttpClientBatchingMode.ApolloRequestBatching) + if (!originalRequest.RequiresFileUpload + && _configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching)) { - httpRequest = new GraphQLHttpRequest(CreateOperationBatchRequest(context, originalRequest, ref buffer)) + httpRequest = new GraphQLHttpRequest(CreateVariableBatchRequest(operationSourceText, originalRequest)) { Uri = _configuration.BaseAddress, - AcceptHeaderValue = _configuration.BatchingAcceptHeaderValue, - EnableFileUploads = originalRequest.RequiresFileUpload + AcceptHeaderValue = _configuration.BatchingAcceptHeaderValue }; } else { - httpRequest = new GraphQLHttpRequest(CreateVariableBatchRequest(operationSourceText, originalRequest)) + httpRequest = new GraphQLHttpRequest(CreateOperationBatchRequest(context, originalRequest, ref buffer)) { Uri = _configuration.BaseAddress, - AcceptHeaderValue = _configuration.BatchingAcceptHeaderValue + AcceptHeaderValue = _configuration.BatchingAcceptHeaderValue, + EnableFileUploads = originalRequest.RequiresFileUpload }; } break; @@ -761,7 +746,7 @@ public override IAsyncEnumerable ReadAsResultStreamAsync( private async IAsyncEnumerable ReadAsResultStreamCoreAsync( [EnumeratorCancellation] CancellationToken cancellationToken = default) { - if (operation == OperationType.Subscription) + if (operation is OperationType.Subscription) { await foreach (var result in response.ReadAsResultStreamAsync().WithCancellation(cancellationToken)) { @@ -794,26 +779,7 @@ private async IAsyncEnumerable ReadAsResultStreamCoreAsync( { SourceSchemaResult? errorResult = null; - if (configuration.BatchingMode == SourceSchemaHttpClientBatchingMode.ApolloRequestBatching) - { - var requestIndex = 0; - await foreach (var result in response.ReadAsResultStreamAsync() - .WithCancellation(cancellationToken)) - { - if ((uint)requestIndex >= (uint)variables.Length) - { - errorResult = new SourceSchemaResult(variables[0].Path, result); - break; - } - - var variable = variables[requestIndex]; - yield return new SourceSchemaResult( - variable.Path, result, additionalPaths: variable.AdditionalPaths); - - requestIndex++; - } - } - else + if (configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching)) { await foreach (var result in response.ReadAsResultStreamAsync() .WithCancellation(cancellationToken)) @@ -841,6 +807,25 @@ private async IAsyncEnumerable ReadAsResultStreamCoreAsync( variable.Path, result, additionalPaths: variable.AdditionalPaths); } } + else + { + var requestIndex = 0; + await foreach (var result in response.ReadAsResultStreamAsync() + .WithCancellation(cancellationToken)) + { + if ((uint)requestIndex >= (uint)variables.Length) + { + errorResult = new SourceSchemaResult(variables[0].Path, result); + break; + } + + var variable = variables[requestIndex]; + yield return new SourceSchemaResult( + variable.Path, result, additionalPaths: variable.AdditionalPaths); + + requestIndex++; + } + } if (errorResult is not null) { @@ -861,7 +846,7 @@ private async IAsyncEnumerable ReadAsResultStreamWithCallbac Action onSourceSchemaResult, [EnumeratorCancellation] CancellationToken cancellationToken = default) { - if (operation == OperationType.Subscription) + if (operation is OperationType.Subscription) { await foreach (var result in response.ReadAsResultStreamAsync().WithCancellation(cancellationToken)) { @@ -898,55 +883,55 @@ private async IAsyncEnumerable ReadAsResultStreamWithCallbac { SourceSchemaResult? errorResult = null; - if (configuration.BatchingMode == SourceSchemaHttpClientBatchingMode.ApolloRequestBatching) + if (configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching)) { - var requestIndex = 0; await foreach (var result in response.ReadAsResultStreamAsync() .WithCancellation(cancellationToken)) { - if ((uint)requestIndex >= (uint)variables.Length) + if (!result.Root.TryGetProperty(VariableIndex, out var variableIndex) + || variableIndex.ValueKind is not JsonValueKind.Number) { errorResult = new SourceSchemaResult(variables[0].Path, result); onSourceSchemaResult(context, node, errorResult); break; } - var variable = variables[requestIndex]; + var index = variableIndex.GetInt32(); + + if ((uint)index >= (uint)variables.Length) + { + errorResult = new SourceSchemaResult(variables[0].Path, result); + onSourceSchemaResult(context, node, errorResult); + break; + } + + var variable = variables[index]; var sourceSchemaResult = new SourceSchemaResult( variable.Path, result, additionalPaths: variable.AdditionalPaths); onSourceSchemaResult(context, node, sourceSchemaResult); yield return sourceSchemaResult; - - requestIndex++; } } else { + var requestIndex = 0; await foreach (var result in response.ReadAsResultStreamAsync() .WithCancellation(cancellationToken)) { - if (!result.Root.TryGetProperty(VariableIndex, out var variableIndex) - || variableIndex.ValueKind is not JsonValueKind.Number) - { - errorResult = new SourceSchemaResult(variables[0].Path, result); - onSourceSchemaResult(context, node, errorResult); - break; - } - - var index = variableIndex.GetInt32(); - - if ((uint)index >= (uint)variables.Length) + if ((uint)requestIndex >= (uint)variables.Length) { errorResult = new SourceSchemaResult(variables[0].Path, result); onSourceSchemaResult(context, node, errorResult); break; } - var variable = variables[index]; + var variable = variables[requestIndex]; var sourceSchemaResult = new SourceSchemaResult( variable.Path, result, additionalPaths: variable.AdditionalPaths); onSourceSchemaResult(context, node, sourceSchemaResult); yield return sourceSchemaResult; + + requestIndex++; } } diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClientBatchingMode.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClientBatchingMode.cs deleted file mode 100644 index de84170c610..00000000000 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClientBatchingMode.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace HotChocolate.Fusion.Execution.Clients; - -[Flags] -public enum SourceSchemaHttpClientBatchingMode -{ - None = 0, - VariableBatching = 1, - RequestBatching = 2, - ApolloRequestBatching = 4 -} diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClientConfiguration.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClientConfiguration.cs index 9b259516860..0a455275548 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClientConfiguration.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClientConfiguration.cs @@ -23,8 +23,8 @@ public class SourceSchemaHttpClientConfiguration : ISourceSchemaClientConfigurat /// /// The supported operations. /// - /// - /// The batching mode. + /// + /// The client capabilities. /// /// /// The Accept header values sent in case of a single, non-Subscription GraphQL request. @@ -48,9 +48,7 @@ public SourceSchemaHttpClientConfiguration( string name, Uri baseAddress, SupportedOperationType supportedOperations = SupportedOperationType.All, - SourceSchemaHttpClientBatchingMode batchingMode = - SourceSchemaHttpClientBatchingMode.VariableBatching - | SourceSchemaHttpClientBatchingMode.RequestBatching, + SourceSchemaClientCapabilities? capabilities = null, ImmutableArray? defaultAcceptHeaderValues = null, ImmutableArray? batchingAcceptHeaderValues = null, ImmutableArray? subscriptionAcceptHeaderValues = null, @@ -62,7 +60,7 @@ public SourceSchemaHttpClientConfiguration( DefaultClientName, baseAddress, supportedOperations, - batchingMode, + capabilities, defaultAcceptHeaderValues, batchingAcceptHeaderValues, subscriptionAcceptHeaderValues, @@ -87,8 +85,8 @@ public SourceSchemaHttpClientConfiguration( /// /// The supported operations. /// - /// - /// The batching mode. + /// + /// The client capabilities. /// /// /// The Accept header values sent in case of a single, non-Subscription GraphQL request. @@ -113,9 +111,7 @@ public SourceSchemaHttpClientConfiguration( string httpClientName, Uri baseAddress, SupportedOperationType supportedOperations = SupportedOperationType.All, - SourceSchemaHttpClientBatchingMode batchingMode = - SourceSchemaHttpClientBatchingMode.VariableBatching - | SourceSchemaHttpClientBatchingMode.RequestBatching, + SourceSchemaClientCapabilities? capabilities = null, ImmutableArray? defaultAcceptHeaderValues = null, ImmutableArray? batchingAcceptHeaderValues = null, ImmutableArray? subscriptionAcceptHeaderValues = null, @@ -127,23 +123,20 @@ public SourceSchemaHttpClientConfiguration( ArgumentNullException.ThrowIfNull(httpClientName); ArgumentNullException.ThrowIfNull(baseAddress); - if (batchingMode.HasFlag(SourceSchemaHttpClientBatchingMode.VariableBatching)) - { - batchingMode &= ~SourceSchemaHttpClientBatchingMode.ApolloRequestBatching; - } - Name = name; HttpClientName = httpClientName; BaseAddress = baseAddress; SupportedOperations = supportedOperations; - BatchingMode = batchingMode; + Capabilities = capabilities + ?? SourceSchemaClientCapabilities.VariableBatching + | SourceSchemaClientCapabilities.RequestBatching; DefaultAcceptHeaderValue = defaultAcceptHeaderValues is null ? AcceptContentTypes.DefaultHeader : AcceptContentTypes.FormatAcceptHeader(defaultAcceptHeaderValues.Value); BatchingAcceptHeaderValue = batchingAcceptHeaderValues is null - ? AcceptContentTypes.VariableBatchingHeader + ? AcceptContentTypes.BatchingHeader : AcceptContentTypes.FormatAcceptHeader(batchingAcceptHeaderValues.Value); SubscriptionAcceptHeaderValue = subscriptionAcceptHeaderValues is null @@ -176,9 +169,9 @@ public SourceSchemaHttpClientConfiguration( public SupportedOperationType SupportedOperations { get; } /// - /// Gets the preferred batching mode. + /// Gets the client capabilities. /// - public SourceSchemaHttpClientBatchingMode BatchingMode { get; } + public SourceSchemaClientCapabilities Capabilities { get; } /// /// Gets a pre-formatted Accept header string for single, non-Subscription GraphQL requests. @@ -212,7 +205,7 @@ public SourceSchemaHttpClientConfiguration( private static class AcceptContentTypes { - public static ImmutableArray Default { get; } = + private static ImmutableArray Default { get; } = [ new("application/graphql-response+json") { CharSet = "utf-8" }, new("application/json") { CharSet = "utf-8" }, @@ -220,7 +213,7 @@ private static class AcceptContentTypes new("text/event-stream") { CharSet = "utf-8" } ]; - public static ImmutableArray VariableBatching { get; } = + private static ImmutableArray Batching { get; } = [ new("application/jsonl") { CharSet = "utf-8" }, new("text/event-stream") { CharSet = "utf-8" }, @@ -228,12 +221,7 @@ private static class AcceptContentTypes new("application/json") { CharSet = "utf-8" } ]; - public static ImmutableArray ApolloRequestBatching { get; } = - [ - new("application/json") { CharSet = "utf-8" } - ]; - - public static ImmutableArray Subscription { get; } = + private static ImmutableArray Subscription { get; } = [ new("application/jsonl") { CharSet = "utf-8" }, new("text/event-stream") { CharSet = "utf-8" } @@ -241,9 +229,7 @@ private static class AcceptContentTypes public static string DefaultHeader { get; } = FormatAcceptHeader(Default); - public static string VariableBatchingHeader { get; } = FormatAcceptHeader(VariableBatching); - - public static string ApolloRequestBatchingHeader { get; } = FormatAcceptHeader(ApolloRequestBatching); + public static string BatchingHeader { get; } = FormatAcceptHeader(Batching); public static string SubscriptionHeader { get; } = FormatAcceptHeader(Subscription); diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestExecutorManager.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestExecutorManager.cs index 0236173ba24..c669f36089d 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestExecutorManager.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestExecutorManager.cs @@ -309,107 +309,7 @@ private SourceSchemaClientConfigurations CreateClientConfigurations( { if (transports.TryGetProperty("http", out var http)) { - var clientName = SourceSchemaHttpClientConfiguration.DefaultClientName; - var batchingMode = SourceSchemaHttpClientBatchingMode.None; - var supportedOperations = SupportedOperationType.Query | SupportedOperationType.Mutation; - ImmutableArray? defaultAcceptHeaderValues = null; - ImmutableArray? batchingAcceptHeaderValues = null; - ImmutableArray? subscriptionAcceptHeaderValues = null; - - if (http.TryGetProperty("clientName", out var clientNameProperty) - && clientNameProperty.ValueKind is JsonValueKind.String - && clientNameProperty.GetString() is { } customClientName - && !string.IsNullOrEmpty(customClientName)) - { - clientName = customClientName; - } - - if (http.TryGetProperty("capabilities", out var capabilities)) - { - if (capabilities.TryGetProperty("standard", out var standard)) - { - if (standard.TryGetProperty("formats", out var formats)) - { - var builder = ImmutableArray.CreateBuilder(); - - foreach (var format in formats.EnumerateArray()) - { - builder.Add(MediaTypeWithQualityHeaderValue.Parse(format.GetString()!)); - } - - defaultAcceptHeaderValues = builder.ToImmutable(); - } - } - - if (capabilities.TryGetProperty("batching", out var variableBatching)) - { - if (!variableBatching.TryGetProperty("variableBatching", out var supported) - || supported.GetBoolean()) - { - batchingMode |= SourceSchemaHttpClientBatchingMode.VariableBatching; - } - - if (!variableBatching.TryGetProperty("requestBatching", out supported) - || supported.GetBoolean()) - { - batchingMode |= SourceSchemaHttpClientBatchingMode.RequestBatching; - } - - if (!variableBatching.TryGetProperty("apolloRequestBatching", out supported) - || supported.GetBoolean()) - { - batchingMode |= SourceSchemaHttpClientBatchingMode.ApolloRequestBatching; - } - - if (variableBatching.TryGetProperty("formats", out var formats)) - { - var builder = ImmutableArray.CreateBuilder(); - - foreach (var format in formats.EnumerateArray()) - { - builder.Add(MediaTypeWithQualityHeaderValue.Parse(format.GetString()!)); - } - - batchingAcceptHeaderValues = builder.ToImmutable(); - } - } - - if (capabilities.TryGetProperty("subscriptions", out var requestBatching)) - { - if (!requestBatching.TryGetProperty("supported", out var supported) - || supported.GetBoolean()) - { - supportedOperations |= SupportedOperationType.Subscription; - } - - if (requestBatching.TryGetProperty("formats", out var formats)) - { - var builder = ImmutableArray.CreateBuilder(); - - foreach (var format in formats.EnumerateArray()) - { - builder.Add(MediaTypeWithQualityHeaderValue.Parse(format.GetString()!)); - } - - subscriptionAcceptHeaderValues = builder.ToImmutable(); - } - } - } - else - { - batchingMode = SourceSchemaHttpClientBatchingMode.VariableBatching - | SourceSchemaHttpClientBatchingMode.RequestBatching; - supportedOperations |= SupportedOperationType.Subscription; - } - - var httpClient = new SourceSchemaHttpClientConfiguration( - name: sourceSchema.Name, - httpClientName: clientName, - baseAddress: new Uri(http.GetProperty("url").GetString()!), - supportedOperations: supportedOperations, - batchingMode: GetBatchingMode(http)); - - configurations.Add(httpClient); + configurations.Add(CreateHttpClientConfiguration(sourceSchema.Name, http)); } } } @@ -423,17 +323,116 @@ private SourceSchemaClientConfigurations CreateClientConfigurations( return new SourceSchemaClientConfigurations(configurations); } - private static SourceSchemaHttpClientBatchingMode GetBatchingMode(JsonElement httpSettings) + private static SourceSchemaHttpClientConfiguration CreateHttpClientConfiguration( + string schemaName, + JsonElement http) { - if (httpSettings.TryGetProperty("batchingMode", out var batchingMode) - && batchingMode.ValueKind == JsonValueKind.String - && batchingMode.GetString() == "REQUEST_BATCHING") + var clientName = SourceSchemaHttpClientConfiguration.DefaultClientName; + var capabilities = SourceSchemaClientCapabilities.None; + var supportedOperations = SupportedOperationType.Query | SupportedOperationType.Mutation; + ImmutableArray? defaultAcceptHeaderValues = null; + ImmutableArray? batchingAcceptHeaderValues = null; + ImmutableArray? subscriptionAcceptHeaderValues = null; + + if (http.TryGetProperty("clientName", out var clientNameProperty) + && clientNameProperty.ValueKind is JsonValueKind.String + && clientNameProperty.GetString() is { } customClientName + && !string.IsNullOrEmpty(customClientName)) + { + clientName = customClientName; + } + + if (http.TryGetProperty("capabilities", out var capabilitiesElement)) + { + if (capabilitiesElement.TryGetProperty("standard", out var standard)) + { + if (standard.TryGetProperty("formats", out var formats)) + { + var builder = ImmutableArray.CreateBuilder(); + + foreach (var format in formats.EnumerateArray()) + { + builder.Add(MediaTypeWithQualityHeaderValue.Parse(format.GetString()!)); + } + + defaultAcceptHeaderValues = builder.ToImmutable(); + } + } + + if (capabilitiesElement.TryGetProperty("batching", out var variableBatching)) + { + if (!variableBatching.TryGetProperty("variableBatching", out var supported) + || supported.GetBoolean()) + { + capabilities |= SourceSchemaClientCapabilities.VariableBatching; + } + + if (!variableBatching.TryGetProperty("requestBatching", out supported) + || supported.GetBoolean()) + { + capabilities |= SourceSchemaClientCapabilities.RequestBatching; + } + + if (!variableBatching.TryGetProperty("apolloRequestBatching", out supported) + || supported.GetBoolean()) + { + capabilities |= SourceSchemaClientCapabilities.ApolloRequestBatching; + } + + if (variableBatching.TryGetProperty("formats", out var formats)) + { + var builder = ImmutableArray.CreateBuilder(); + + foreach (var format in formats.EnumerateArray()) + { + builder.Add(MediaTypeWithQualityHeaderValue.Parse(format.GetString()!)); + } + + batchingAcceptHeaderValues = builder.ToImmutable(); + } + } + + if (capabilitiesElement.TryGetProperty("subscriptions", out var requestBatching)) + { + if (!requestBatching.TryGetProperty("supported", out var supported) + || supported.GetBoolean()) + { + supportedOperations |= SupportedOperationType.Subscription; + } + + if (requestBatching.TryGetProperty("formats", out var formats)) + { + var builder = ImmutableArray.CreateBuilder(); + + foreach (var format in formats.EnumerateArray()) + { + builder.Add(MediaTypeWithQualityHeaderValue.Parse(format.GetString()!)); + } + + subscriptionAcceptHeaderValues = builder.ToImmutable(); + } + } + else + { + supportedOperations |= SupportedOperationType.Subscription; + } + } + else { - return SourceSchemaHttpClientBatchingMode.ApolloRequestBatching; + capabilities = SourceSchemaClientCapabilities.VariableBatching + | SourceSchemaClientCapabilities.RequestBatching; + supportedOperations |= SupportedOperationType.Subscription; } - return SourceSchemaHttpClientBatchingMode.VariableBatching - | SourceSchemaHttpClientBatchingMode.RequestBatching; + return new SourceSchemaHttpClientConfiguration( + name: schemaName, + httpClientName: clientName, + baseAddress: new Uri(http.GetProperty("url").GetString()!), + supportedOperations: supportedOperations, + capabilities: capabilities, + defaultAcceptHeaderValues: defaultAcceptHeaderValues, + batchingAcceptHeaderValues: batchingAcceptHeaderValues, + subscriptionAcceptHeaderValues: subscriptionAcceptHeaderValues); } private FeatureCollection CreateSchemaFeatures( diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs index 0aaa68cc267..a1974fd2648 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs @@ -64,7 +64,7 @@ public async Task Fetch_Book_From_SourceSchema1_With_Settings() ("a", server1), ("b", server2) ], - schemaSettings: + gatewaySettings: """ { "sourceSchemas": { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs index 17949d64754..79ac3e2843c 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs @@ -20,12 +20,12 @@ protected TestServer CreateSourceSchema( Action? configureServices = null, Action? configureApplication = null, Action? configureHttpClient = null, - SourceSchemaHttpClientBatchingMode batchingMode = - SourceSchemaHttpClientBatchingMode.VariableBatching - | SourceSchemaHttpClientBatchingMode.RequestBatching, - ImmutableArray? batchingAcceptHeaderValues = null, bool isOffline = false, - bool isTimingOut = false) + bool isTimingOut = false, + SourceSchemaClientCapabilities? capabilities = null, + ImmutableArray? defaultAcceptHeaderValues = null, + ImmutableArray? batchingAcceptHeaderValues = null, + ImmutableArray? subscriptionAcceptHeaderValues = null) { configureApplication ??= app => @@ -51,8 +51,10 @@ protected TestServer CreateSourceSchema( opt.IsOffline = isOffline; opt.IsTimingOut = isTimingOut; opt.ConfigureHttpClient = configureHttpClient; - opt.BatchingMode = batchingMode; + opt.Capabilities = capabilities; + opt.DefaultAcceptHeaderValues = defaultAcceptHeaderValues; opt.BatchingAcceptHeaderValues = batchingAcceptHeaderValues; + opt.SubscriptionAcceptHeaderValues = subscriptionAcceptHeaderValues; }); }, configureApplication); @@ -63,12 +65,12 @@ protected TestServer CreateSourceSchema( string schemaText, bool isOffline = false, bool isTimingOut = false, - SourceSchemaHttpClientBatchingMode batchingMode = - SourceSchemaHttpClientBatchingMode.VariableBatching - | SourceSchemaHttpClientBatchingMode.RequestBatching, - ImmutableArray? batchingAcceptHeaderValues = null, Action? configureHttpClient = null, - HttpClient? httpClient = null) + HttpClient? httpClient = null, + SourceSchemaClientCapabilities? capabilities = null, + ImmutableArray? defaultAcceptHeaderValues = null, + ImmutableArray? batchingAcceptHeaderValues = null, + ImmutableArray? subscriptionAcceptHeaderValues = null) { return _testServerSession.CreateServer(services => { @@ -89,8 +91,10 @@ protected TestServer CreateSourceSchema( opt.IsTimingOut = isTimingOut; opt.ConfigureHttpClient = configureHttpClient; opt.HttpClient = httpClient; - opt.BatchingMode = batchingMode; + opt.Capabilities = capabilities; + opt.DefaultAcceptHeaderValues = defaultAcceptHeaderValues; opt.BatchingAcceptHeaderValues = batchingAcceptHeaderValues; + opt.SubscriptionAcceptHeaderValues = subscriptionAcceptHeaderValues; }); }, app => diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.MatchSnapshot.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.MatchSnapshot.cs index ac7e60c7fa6..12ab4921554 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.MatchSnapshot.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.MatchSnapshot.cs @@ -86,41 +86,32 @@ private static async Task TryWriteOperationPlanAsync( { foreach (var result in results) { - try + if (result.Extensions.ValueKind is JsonValueKind.Object + && result.Extensions.TryGetProperty("fusion", out var fusionProperty) + && fusionProperty.TryGetProperty("operationPlan", out var operationPlanProperty)) { - if (result.Extensions.ValueKind is JsonValueKind.Object - && result.Extensions.TryGetProperty("fusion", out var fusionProperty) - && fusionProperty.TryGetProperty("operationPlan", out var operationPlanProperty)) - { - var manager = gateway.Services.GetRequiredService(); - var executor = await manager.GetExecutorAsync(); - var operationCompiler = executor.Schema.Services.GetRequiredService(); - var parser = new JsonOperationPlanParser(operationCompiler); + var manager = gateway.Services.GetRequiredService(); + var executor = await manager.GetExecutorAsync(); + var operationCompiler = executor.Schema.Services.GetRequiredService(); + var parser = new JsonOperationPlanParser(operationCompiler); - var buffer = new PooledArrayWriter(); - await using var jsonWriter = new Utf8JsonWriter(buffer); + var buffer = new PooledArrayWriter(); + await using var jsonWriter = new Utf8JsonWriter(buffer); - operationPlanProperty.WriteTo(jsonWriter); - await jsonWriter.FlushAsync(); + operationPlanProperty.WriteTo(jsonWriter); + await jsonWriter.FlushAsync(); - var plan = parser.Parse(buffer.WrittenMemory); + var plan = parser.Parse(buffer.WrittenMemory); - var operationPlanFormatter = new YamlOperationPlanFormatter(); - var formattedOperationPlan = operationPlanFormatter.Format(plan); + var operationPlanFormatter = new YamlOperationPlanFormatter(); + var formattedOperationPlan = operationPlanFormatter.Format(plan); - writer.WriteLine("operationPlan:"); - writer.Indent(); - WriteMultilineString(writer, formattedOperationPlan); - writer.Unindent(); + writer.WriteLine("operationPlan:"); + writer.Indent(); + WriteMultilineString(writer, formattedOperationPlan); + writer.Unindent(); - break; - } - } - catch - { - // For some reason - // CancellationTests.Request_Is_Running_Into_Execution_Timeout_While_Http_Request_In_Node_Is_Still_Ongoing - // runs into an issue here + break; } } } @@ -237,6 +228,11 @@ private static void WriteSourceSchema( writer.Indent(); writer.Indent(); + if (!string.IsNullOrEmpty(request.Accept)) + { + writer.WriteLine("accept: {0}", request.Accept); + } + if (request.ContentType.MediaType?.StartsWith("multipart/", StringComparison.OrdinalIgnoreCase) == true) { WriteMultipartRequest(writer, request.ContentType, request.Body); diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs index ee278008e7f..5f140a3206e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs @@ -36,7 +36,7 @@ protected async Task CreateCompositeSchemaAsync( Action? configureServices = null, Action? configureApplication = null, Action? configureGatewayBuilder = null, - [StringSyntax("json")] string? schemaSettings = null) + [StringSyntax("json")] string? gatewaySettings = null) { var sourceSchemas = new List(); var gatewayServices = new ServiceCollection(); @@ -56,13 +56,15 @@ protected async Task CreateCompositeSchemaAsync( gatewayServices.TryAddSingleton(); gatewayServices.AddSingleton(new TestServerRegistration(name, server, sourceSchemaOptions)); - if (schemaSettings is null) + if (gatewaySettings is null) { gatewayBuilder.AddHttpClientConfiguration( name, new Uri("http://localhost:5000/graphql"), - batchingMode: sourceSchemaOptions.BatchingMode, + capabilities: sourceSchemaOptions.Capabilities, + defaultAcceptHeaderValues: sourceSchemaOptions.DefaultAcceptHeaderValues, batchingAcceptHeaderValues: sourceSchemaOptions.BatchingAcceptHeaderValues, + subscriptionAcceptHeaderValues: sourceSchemaOptions.SubscriptionAcceptHeaderValues, onBeforeSend: (context, node, request) => { var interaction = GetOrCreateInteractionForRequest(context, node, request); @@ -96,7 +98,10 @@ protected async Task CreateCompositeSchemaAsync( interaction.Request = new SourceSchemaInteraction.RawSourceSchemaRequest { Body = bodyStream, - ContentType = contentType + ContentType = contentType, + Accept = request.Headers.Accept.Count > 0 + ? string.Join(", ", request.Headers.Accept) + : null }; }, onAfterReceive: (context, node, response) => @@ -141,9 +146,9 @@ protected async Task CreateCompositeSchemaAsync( } JsonDocumentOwner? settings = null; - if (schemaSettings is not null) + if (gatewaySettings is not null) { - var body = JsonDocument.Parse(schemaSettings); + var body = JsonDocument.Parse(gatewaySettings); settings = new JsonDocumentOwner(body, new EmptyMemoryOwner()); } @@ -267,6 +272,7 @@ public sealed class RawSourceSchemaRequest { public required MemoryStream Body { get; init; } public required MediaTypeHeaderValue ContentType { get; init; } + public string? Accept { get; init; } } } @@ -276,13 +282,17 @@ private sealed class SourceSchemaOptions public bool IsTimingOut { get; set; } - public SourceSchemaHttpClientBatchingMode BatchingMode { get; set; } - - public ImmutableArray? BatchingAcceptHeaderValues { get; set; } - public Action? ConfigureHttpClient { get; set; } public HttpClient? HttpClient { get; set; } + + public SourceSchemaClientCapabilities? Capabilities { get; set; } + + public ImmutableArray? DefaultAcceptHeaderValues { get; set; } + + public ImmutableArray? BatchingAcceptHeaderValues { get; set; } + + public ImmutableArray? SubscriptionAcceptHeaderValues { get; set; } } private sealed class OperationPlanHttpRequestInterceptor : DefaultHttpRequestInterceptor diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs index 3dcb50b1617..9d0f3cdb443 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs @@ -1,6 +1,3 @@ -using System.Net; -using System.Text; -using HotChocolate.Fusion.Execution.Clients; using HotChocolate.Transport; using HotChocolate.Transport.Http; using HotChocolate.Types; @@ -142,517 +139,6 @@ public async Task Fetch_OneOf_Lookup_With_Id() await MatchSnapshotAsync(gateway, request, result); } - [Fact] - public async Task Fetch_With_Request_Batching_JsonLines() - { - // arrange - using var server1 = CreateSourceSchema( - "a", - b => b.AddQueryType()); - - using var server2 = CreateSourceSchema( - "b", - b => b.AddQueryType(), - batchingMode: SourceSchemaHttpClientBatchingMode.ApolloRequestBatching, - batchingAcceptHeaderValues: [new("application/jsonl") { CharSet = "utf-8" }]); - - using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - books { - author { - id - name - } - } - } - """); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result); - } - - [Fact] - public async Task Fetch_With_Request_Batching_JsonLines_Large_Response() - { - // arrange - using var server1 = CreateSourceSchema( - "a", - b => b.AddQueryType()); - - using var server2 = CreateSourceSchema( - "b", - b => b.AddQueryType(), - batchingMode: SourceSchemaHttpClientBatchingMode.ApolloRequestBatching, - batchingAcceptHeaderValues: [new("application/jsonl") { CharSet = "utf-8" }]); - - using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - books { - author { - id - name(large: true) - } - } - } - """); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result); - } - - [Fact] - public async Task Fetch_With_Request_Batching_SSE() - { - // arrange - using var server1 = CreateSourceSchema( - "a", - b => b.AddQueryType()); - - using var server2 = CreateSourceSchema( - "b", - b => b.AddQueryType(), - batchingMode: SourceSchemaHttpClientBatchingMode.ApolloRequestBatching, - batchingAcceptHeaderValues: [new("text/event-stream") { CharSet = "utf-8" }]); - - using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - books { - author { - id - name - } - } - } - """); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result); - } - - [Fact] - public async Task Fetch_With_Request_Batching_SSE_Large_Response() - { - // arrange - using var server1 = CreateSourceSchema( - "a", - b => b.AddQueryType()); - - using var server2 = CreateSourceSchema( - "b", - b => b.AddQueryType(), - batchingMode: SourceSchemaHttpClientBatchingMode.ApolloRequestBatching, - batchingAcceptHeaderValues: [new("text/event-stream") { CharSet = "utf-8" }]); - - using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - books { - author { - id - name(large: true) - } - } - } - """); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result); - } - - [Fact] - public async Task Fetch_With_Request_Batching_JsonArray() - { - // arrange - using var server1 = CreateSourceSchema( - "a", - b => b.AddQueryType()); - - const string jsonArrayResponse = - """ - [ - { - "data": { - "authorById": { - "name": "Author 1" - } - } - }, - { - "data": { - "authorById": { - "name": "Author 2" - } - } - }, - { - "data": { - "authorById": { - "name": "Author 2" - } - } - }, - { - "data": { - "authorById": { - "name": "Author 2" - } - } - } - ] - """; - - using var server2 = CreateSourceSchema( - "b", - """ - type Query { - authorById(id: ID!): Author @lookup - } - - type Author { - id: ID! - name: String! - } - """, - batchingMode: SourceSchemaHttpClientBatchingMode.ApolloRequestBatching, - httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); - - using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - books { - author { - id - name - } - } - } - """); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result); - } - - [Fact] - public async Task Fetch_With_Request_Batching_JsonArray_Large_Response() - { - // arrange - using var server1 = CreateSourceSchema( - "a", - b => b.AddQueryType()); - - var jsonArrayResponse = - $$""" - [ - { - "data": { - "authorById": { - "name": "Author 1 {{GenerateRandomString(128)}}" - } - } - }, - { - "data": { - "authorById": { - "name": "Author 2 {{GenerateRandomString(128)}}" - } - } - }, - { - "data": { - "authorById": { - "name": "Author 2 {{GenerateRandomString(128)}}" - } - } - }, - { - "data": { - "authorById": { - "name": "Author 2 {{GenerateRandomString(128)}}" - } - } - } - ] - """; - - using var server2 = CreateSourceSchema( - "b", - """ - type Query { - authorById(id: ID!): Author @lookup - } - - type Author { - id: ID! - name: String! - } - """, - batchingMode: SourceSchemaHttpClientBatchingMode.ApolloRequestBatching, - httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); - - using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - books { - author { - id - name - } - } - } - """); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result); - } - - [Fact(Skip = "The Gateway needs to produce errors for this")] - public async Task Fetch_With_Request_Batching_JsonArray_Returns_Wrong_Number_Of_Items() - { - // arrange - using var server1 = CreateSourceSchema( - "a", - b => b.AddQueryType()); - - // this contains just 2 entries, while it should contain 4. - const string jsonArrayResponse = - """ - [ - { - "data": { - "authorById": { - "name": "Author 1" - } - } - }, - { - "data": { - "authorById": { - "name": "Author 2" - } - } - } - ] - """; - - using var server2 = CreateSourceSchema( - "b", - """ - type Query { - authorById(id: ID!): Author @lookup - } - - type Author { - id: ID! - name: String! - } - """, - batchingMode: SourceSchemaHttpClientBatchingMode.ApolloRequestBatching, - httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); - - using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - books { - author { - id - name - } - } - } - """); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result); - } - - [Fact(Skip = "The Gateway needs to produce errors for this")] - public async Task Fetch_With_Request_Batching_JsonArray_Returns_Singular_Response() - { - // arrange - using var server1 = CreateSourceSchema( - "a", - b => b.AddQueryType()); - - const string jsonResponse = - """ - { - "data": { - "authorById": { - "name": "Author 1" - } - } - } - """; - - using var server2 = CreateSourceSchema( - "b", - """ - type Query { - authorById(id: ID!): Author @lookup - } - - type Author { - id: ID! - name: String! - } - """, - batchingMode: SourceSchemaHttpClientBatchingMode.ApolloRequestBatching, - httpClient: new HttpClient(new MockHttpMessageHandler(jsonResponse))); - - using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - books { - author { - id - name - } - } - } - """); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result); - } - - private static string GenerateRandomString(int kiloBytes) - { - var targetBytes = kiloBytes * 1024; - var charsNeeded = targetBytes / 2; - const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - - var random = new Random(0); - var stringBuilder = new StringBuilder(charsNeeded); - - for (var i = 0; i < charsNeeded; i++) - { - stringBuilder.Append(chars[random.Next(chars.Length)]); - } - - return stringBuilder.ToString(); - } - - private sealed class MockHttpMessageHandler(string responseContent) : HttpMessageHandler - { - protected override Task SendAsync( - HttpRequestMessage request, - CancellationToken cancellationToken) - { - var response = new HttpResponseMessage(HttpStatusCode.OK) - { - Content = new StringContent(responseContent, Encoding.UTF8, "application/json") - }; - return Task.FromResult(response); - } - } - public static class NestedLookups { public static class SourceSchema1 @@ -786,30 +272,5 @@ public Author GetTopAuthor() public record Author([property: Shareable] string Name); } - - public static class SourceSchema4 - { - public class Query - { - [Lookup, Internal] - public Author? GetAuthorById([ID] int id) - => new(id); - } - - public record Author([property: ID] int Id) - { - public string GetName(bool large = false) - { - var name = "Author " + Id; - - if (large) - { - return name + " " + GenerateRandomString(128); - } - - return name; - } - } - } } } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs new file mode 100644 index 00000000000..3ebe0c6bb09 --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs @@ -0,0 +1,671 @@ +using System.Net; +using System.Text; +using HotChocolate.Transport; +using HotChocolate.Transport.Http; +using HotChocolate.Types.Composite; +using HotChocolate.Types.Relay; +using Microsoft.Extensions.DependencyInjection; + +namespace HotChocolate.Fusion; + +public class SourceSchemaClientCapabilitiesTests : FusionTestBase +{ + [Fact] + public async Task Test() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType()); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ], + gatewaySettings: + """ + + """); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + author { + id + name + } + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + +// [Fact] +// public async Task Fetch_With_ApolloRequestBatching_JsonLines() +// { +// // arrange +// using var server1 = CreateSourceSchema( +// "a", +// b => b.AddQueryType()); +// +// using var server2 = CreateSourceSchema( +// "b", +// b => b.AddQueryType(), +// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, +// batchingAcceptHeaderValues: [new("application/jsonl") { CharSet = "utf-8" }]); +// +// using var gateway = await CreateCompositeSchemaAsync( +// [ +// ("a", server1), +// ("b", server2) +// ]); +// +// // act +// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); +// +// var request = new OperationRequest( +// """ +// { +// books { +// author { +// id +// name +// } +// } +// } +// """); +// +// using var result = await client.PostAsync( +// request, +// new Uri("http://localhost:5000/graphql")); +// +// // assert +// await MatchSnapshotAsync(gateway, request, result); +// } +// +// [Fact] +// public async Task Fetch_With_ApolloRequestBatching_JsonLines_Large_Response() +// { +// // arrange +// using var server1 = CreateSourceSchema( +// "a", +// b => b.AddQueryType()); +// +// using var server2 = CreateSourceSchema( +// "b", +// b => b.AddQueryType(), +// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, +// batchingAcceptHeaderValues: [new("application/jsonl") { CharSet = "utf-8" }]); +// +// using var gateway = await CreateCompositeSchemaAsync( +// [ +// ("a", server1), +// ("b", server2) +// ]); +// +// // act +// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); +// +// var request = new OperationRequest( +// """ +// { +// books { +// author { +// id +// name(large: true) +// } +// } +// } +// """); +// +// using var result = await client.PostAsync( +// request, +// new Uri("http://localhost:5000/graphql")); +// +// // assert +// await MatchSnapshotAsync(gateway, request, result); +// } +// +// [Fact] +// public async Task Fetch_With_ApolloRequestBatching_SSE() +// { +// // arrange +// using var server1 = CreateSourceSchema( +// "a", +// b => b.AddQueryType()); +// +// using var server2 = CreateSourceSchema( +// "b", +// b => b.AddQueryType(), +// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, +// batchingAcceptHeaderValues: [new("text/event-stream") { CharSet = "utf-8" }]); +// +// using var gateway = await CreateCompositeSchemaAsync( +// [ +// ("a", server1), +// ("b", server2) +// ]); +// +// // act +// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); +// +// var request = new OperationRequest( +// """ +// { +// books { +// author { +// id +// name +// } +// } +// } +// """); +// +// using var result = await client.PostAsync( +// request, +// new Uri("http://localhost:5000/graphql")); +// +// // assert +// await MatchSnapshotAsync(gateway, request, result); +// } +// +// [Fact] +// public async Task Fetch_With_ApolloRequestBatching_SSE_Large_Response() +// { +// // arrange +// using var server1 = CreateSourceSchema( +// "a", +// b => b.AddQueryType()); +// +// using var server2 = CreateSourceSchema( +// "b", +// b => b.AddQueryType(), +// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, +// batchingAcceptHeaderValues: [new("text/event-stream") { CharSet = "utf-8" }]); +// +// using var gateway = await CreateCompositeSchemaAsync( +// [ +// ("a", server1), +// ("b", server2) +// ]); +// +// // act +// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); +// +// var request = new OperationRequest( +// """ +// { +// books { +// author { +// id +// name(large: true) +// } +// } +// } +// """); +// +// using var result = await client.PostAsync( +// request, +// new Uri("http://localhost:5000/graphql")); +// +// // assert +// await MatchSnapshotAsync(gateway, request, result); +// } +// +// [Fact] +// public async Task Fetch_With_ApolloRequestBatching_JsonArray() +// { +// // arrange +// using var server1 = CreateSourceSchema( +// "a", +// b => b.AddQueryType()); +// +// const string jsonArrayResponse = +// """ +// [ +// { +// "data": { +// "authorById": { +// "name": "Author 1" +// } +// } +// }, +// { +// "data": { +// "authorById": { +// "name": "Author 2" +// } +// } +// }, +// { +// "data": { +// "authorById": { +// "name": "Author 2" +// } +// } +// }, +// { +// "data": { +// "authorById": { +// "name": "Author 2" +// } +// } +// } +// ] +// """; +// +// using var server2 = CreateSourceSchema( +// "b", +// """ +// type Query { +// authorById(id: ID!): Author @lookup +// } +// +// type Author { +// id: ID! +// name: String! +// } +// """, +// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, +// httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); +// +// using var gateway = await CreateCompositeSchemaAsync( +// [ +// ("a", server1), +// ("b", server2) +// ]); +// +// // act +// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); +// +// var request = new OperationRequest( +// """ +// { +// books { +// author { +// id +// name +// } +// } +// } +// """); +// +// using var result = await client.PostAsync( +// request, +// new Uri("http://localhost:5000/graphql")); +// +// // assert +// await MatchSnapshotAsync(gateway, request, result); +// } +// +// [Fact] +// public async Task Fetch_With_Request_Batching_JsonArray_Large_Response() +// { +// // arrange +// using var server1 = CreateSourceSchema( +// "a", +// b => b.AddQueryType()); +// +// var jsonArrayResponse = +// $$""" +// [ +// { +// "data": { +// "authorById": { +// "name": "Author 1 {{GenerateRandomString(128)}}" +// } +// } +// }, +// { +// "data": { +// "authorById": { +// "name": "Author 2 {{GenerateRandomString(128)}}" +// } +// } +// }, +// { +// "data": { +// "authorById": { +// "name": "Author 2 {{GenerateRandomString(128)}}" +// } +// } +// }, +// { +// "data": { +// "authorById": { +// "name": "Author 2 {{GenerateRandomString(128)}}" +// } +// } +// } +// ] +// """; +// +// using var server2 = CreateSourceSchema( +// "b", +// """ +// type Query { +// authorById(id: ID!): Author @lookup +// } +// +// type Author { +// id: ID! +// name: String! +// } +// """, +// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, +// httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); +// +// using var gateway = await CreateCompositeSchemaAsync( +// [ +// ("a", server1), +// ("b", server2) +// ]); +// +// // act +// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); +// +// var request = new OperationRequest( +// """ +// { +// books { +// author { +// id +// name +// } +// } +// } +// """); +// +// using var result = await client.PostAsync( +// request, +// new Uri("http://localhost:5000/graphql")); +// +// // assert +// await MatchSnapshotAsync(gateway, request, result); +// } +// +// [Fact(Skip = "The Gateway needs to produce errors for this")] +// public async Task Fetch_With_Request_Batching_JsonArray_Returns_Wrong_Number_Of_Items() +// { +// // arrange +// using var server1 = CreateSourceSchema( +// "a", +// b => b.AddQueryType()); +// +// // this contains just 2 entries, while it should contain 4. +// const string jsonArrayResponse = +// """ +// [ +// { +// "data": { +// "authorById": { +// "name": "Author 1" +// } +// } +// }, +// { +// "data": { +// "authorById": { +// "name": "Author 2" +// } +// } +// } +// ] +// """; +// +// using var server2 = CreateSourceSchema( +// "b", +// """ +// type Query { +// authorById(id: ID!): Author @lookup +// } +// +// type Author { +// id: ID! +// name: String! +// } +// """, +// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, +// httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); +// +// using var gateway = await CreateCompositeSchemaAsync( +// [ +// ("a", server1), +// ("b", server2) +// ]); +// +// // act +// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); +// +// var request = new OperationRequest( +// """ +// { +// books { +// author { +// id +// name +// } +// } +// } +// """); +// +// using var result = await client.PostAsync( +// request, +// new Uri("http://localhost:5000/graphql")); +// +// // assert +// await MatchSnapshotAsync(gateway, request, result); +// } +// +// [Fact(Skip = "The Gateway needs to produce errors for this")] +// public async Task Fetch_With_Request_Batching_JsonArray_Returns_Singular_Response() +// { +// // arrange +// using var server1 = CreateSourceSchema( +// "a", +// b => b.AddQueryType()); +// +// const string jsonResponse = +// """ +// { +// "data": { +// "authorById": { +// "name": "Author 1" +// } +// } +// } +// """; +// +// using var server2 = CreateSourceSchema( +// "b", +// """ +// type Query { +// authorById(id: ID!): Author @lookup +// } +// +// type Author { +// id: ID! +// name: String! +// } +// """, +// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, +// httpClient: new HttpClient(new MockHttpMessageHandler(jsonResponse))); +// +// using var gateway = await CreateCompositeSchemaAsync( +// [ +// ("a", server1), +// ("b", server2) +// ]); +// +// // act +// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); +// +// var request = new OperationRequest( +// """ +// { +// books { +// author { +// id +// name +// } +// } +// } +// """); +// +// using var result = await client.PostAsync( +// request, +// new Uri("http://localhost:5000/graphql")); +// +// // assert +// await MatchSnapshotAsync(gateway, request, result); +// } + + private static string GenerateRandomString(int kiloBytes) + { + var targetBytes = kiloBytes * 1024; + var charsNeeded = targetBytes / 2; + const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + + var random = new Random(0); + var stringBuilder = new StringBuilder(charsNeeded); + + for (var i = 0; i < charsNeeded; i++) + { + stringBuilder.Append(chars[random.Next(chars.Length)]); + } + + return stringBuilder.ToString(); + } + + private sealed class MockHttpMessageHandler(string responseContent) : HttpMessageHandler + { + protected override Task SendAsync( + HttpRequestMessage request, + CancellationToken cancellationToken) + { + var response = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(responseContent, Encoding.UTF8, "application/json") + }; + return Task.FromResult(response); + } + } + + public static class NestedLookups + { + public static class SourceSchema1 + { + public record Book([property: ID] int Id, string Title, [property: Shareable] Author Author); + + [EntityKey("id")] + public record Author([property: ID] int Id); + + public class Query + { + private readonly OrderedDictionary _books = + new() + { + [1] = new Book(1, "C# in Depth", new Author(1)), + [2] = new Book(2, "The Lord of the Rings", new Author(2)), + [3] = new Book(3, "The Hobbit", new Author(2)), + [4] = new Book(4, "The Silmarillion", new Author(2)) + }; + + public IEnumerable GetBooks() + => _books.Values; + } + } + + public static class SourceSchema2 + { + public record Author([property: ID] int Id, string Name); + + public class Query + { + [Internal] public InternalLookups Lookups { get; } = new(); + } + + [Internal] + public class InternalLookups + { + private readonly OrderedDictionary _authors = new() + { + [1] = new Author(1, "Jon Skeet"), [2] = new Author(2, "JRR Tolkien") + }; + + [Lookup] + public Author GetAuthorById([ID] int id) + => _authors[id]; + } + + public record Book([property: ID] int Id, [property: Shareable] Author Author) + { + public string IdAndTitle([Require] string title) + => $"{Id} - {title}"; + } + } + } + + public static class SourceSchema1 + { + public record Book([property: ID] int Id, string Title, [property: Shareable] Author Author); + + [EntityKey("id")] + public record Author([property: ID] int Id); + + public class Query + { + private readonly OrderedDictionary _books = + new() + { + [1] = new Book(1, "C# in Depth", new Author(1)), + [2] = new Book(2, "The Lord of the Rings", new Author(2)), + [3] = new Book(3, "The Hobbit", new Author(2)), + [4] = new Book(4, "The Silmarillion", new Author(2)) + }; + + public IEnumerable GetBooks() + => _books.Values; + } + } + + public static class SourceSchema2 + { + public class Query + { + [Lookup, Internal] + public Author? GetAuthorById([ID] int id) + => new(id); + } + + public record Author([property: ID] int Id) + { + public string GetName(bool large = false) + { + var name = "Author " + Id; + + if (large) + { + return name + " " + GenerateRandomString(128); + } + + return name; + } + } + } +} diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type.yaml index b4027ab61f6..5d690fe7ced 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type.yaml @@ -86,6 +86,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_05500418_1 { abstractType { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_Direct_Source_Schema_Call.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_Direct_Source_Schema_Call.yaml index def6281190a..24651a1f0f1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_Direct_Source_Schema_Call.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_Direct_Source_Schema_Call.yaml @@ -91,6 +91,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_45eb4c09_1 { interfaceConnection(first: 2) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_With_Abstract_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_With_Abstract_Lookup.yaml index 5d6099fad97..292bd460c35 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_With_Abstract_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_With_Abstract_Lookup.yaml @@ -85,6 +85,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_ddf05407_1 { otherAbstractType { @@ -134,6 +135,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_ddf05407_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_With_Concrete_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_With_Concrete_Lookup.yaml index 39427112b11..32e632feef7 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_With_Concrete_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Abstract_Type_With_Concrete_Lookup.yaml @@ -85,6 +85,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_bf0deff6_1 { abstractType { @@ -134,6 +135,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_bf0deff6_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Concrete_Type_With_Abstract_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Concrete_Type_With_Abstract_Lookup.yaml index 47ea4b9943d..863451b5fa1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Concrete_Type_With_Abstract_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Concrete_Type_With_Abstract_Lookup.yaml @@ -81,6 +81,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_94874bbd_1 { authorById(id: 1) { @@ -125,6 +126,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_94874bbd_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Concrete_Lookups.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Concrete_Lookups.yaml index 78f6df6ced4..76e0e491c98 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Concrete_Lookups.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Concrete_Lookups.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_fb4e28df_1 { votable { @@ -86,6 +87,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_fb4e28df_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Concrete_Lookups_And_Field_From_Specific_Source.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Concrete_Lookups_And_Field_From_Specific_Source.yaml index be9c57537de..db3ffbb4b6a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Concrete_Lookups_And_Field_From_Specific_Source.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Concrete_Lookups_And_Field_From_Specific_Source.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_1bcbe788_1 { votable { @@ -111,6 +112,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_1bcbe788_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Interface_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Interface_Lookup.yaml index b8e0cb08705..ac461331c97 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Interface_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Interface_Lookup.yaml @@ -37,6 +37,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_fb4e28df_1 { votable { @@ -76,6 +77,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_fb4e28df_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Interface_Lookup_And_Field_From_Specific_Source.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Interface_Lookup_And_Field_From_Specific_Source.yaml index 285a8291783..93339941563 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Interface_Lookup_And_Field_From_Specific_Source.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Interface_Field_Without_Type_Refinements_With_Interface_Lookup_And_Field_From_Specific_Source.yaml @@ -37,6 +37,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_1bcbe788_1 { votable { @@ -95,6 +96,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_1bcbe788_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.List_Of_Abstract_Types.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.List_Of_Abstract_Types.yaml index 826076fcc92..6d4c8132943 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.List_Of_Abstract_Types.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.List_Of_Abstract_Types.yaml @@ -95,6 +95,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_39311c2e_1 { abstractTypes { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Concrete_Lookups.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Concrete_Lookups.yaml index 66f52b8dfb9..a3028ed8164 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Concrete_Lookups.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Concrete_Lookups.yaml @@ -42,6 +42,7 @@ sourceSchemas: union SearchResult = User | Product interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_465e7f4e_1 { search { @@ -87,6 +88,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_465e7f4e_3( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Concrete_Lookups_With_Additional_Concrete_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Concrete_Lookups_With_Additional_Concrete_Dependency.yaml index 6eb982c1eba..68d66e40fa6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Concrete_Lookups_With_Additional_Concrete_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Concrete_Lookups_With_Additional_Concrete_Dependency.yaml @@ -44,6 +44,7 @@ sourceSchemas: union SearchResult = User | Product interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e8751f64_1 { search { @@ -89,6 +90,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_e8751f64_3( $__fusion_2_id: ID! @@ -127,6 +129,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e8751f64_4( $__fusion_3_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Union_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Union_Lookup.yaml index e03039e9e53..f947f62b259 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Union_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Union_Lookup.yaml @@ -42,6 +42,7 @@ sourceSchemas: union SearchResult = User | Product interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_465e7f4e_1 { search { @@ -88,6 +89,7 @@ sourceSchemas: union SearchResult = User | Product interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_465e7f4e_3( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Union_Lookup_With_Additional_Concrete_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Union_Lookup_With_Additional_Concrete_Dependency.yaml index 5ce2aec28aa..757b5086cab 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Union_Lookup_With_Additional_Concrete_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AbstractTypeTests.Union_Field_With_Type_Refinements_And_Union_Lookup_With_Additional_Concrete_Dependency.yaml @@ -44,6 +44,7 @@ sourceSchemas: union SearchResult = User | Product interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e8751f64_1 { search { @@ -90,6 +91,7 @@ sourceSchemas: union SearchResult = User | Product interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_e8751f64_3( $__fusion_2_id: ID! @@ -132,6 +134,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e8751f64_4( $__fusion_3_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ComplexNested.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ComplexNested.yaml index 7903f7db5e9..abcf1c9ecdb 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ComplexNested.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ComplexNested.yaml @@ -79,6 +79,7 @@ sourceSchemas: scalar Any @serializeAs(type: [STRING, BOOLEAN, INT, FLOAT, OBJECT, LIST]) @specifiedBy(url: "https://scalars.graphql.org/chillicream/any.html") interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_3d57cc6e_1 { complexNested diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_List.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_List.yaml index 7639189f63a..85c908c5b3c 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_List.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_List.yaml @@ -60,6 +60,7 @@ sourceSchemas: scalar Any @serializeAs(type: [STRING, BOOLEAN, INT, FLOAT, OBJECT, LIST]) @specifiedBy(url: "https://scalars.graphql.org/chillicream/any.html") interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_1d43df26_1 { list diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ListOfObjects.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ListOfObjects.yaml index 75b52085339..8bed01b7faf 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ListOfObjects.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ListOfObjects.yaml @@ -67,6 +67,7 @@ sourceSchemas: scalar Any @serializeAs(type: [STRING, BOOLEAN, INT, FLOAT, OBJECT, LIST]) @specifiedBy(url: "https://scalars.graphql.org/chillicream/any.html") interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_d853a8aa_1 { listOfObjects diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_NestedObject.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_NestedObject.yaml index 111c22a5ab5..1870886a83a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_NestedObject.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_NestedObject.yaml @@ -61,6 +61,7 @@ sourceSchemas: scalar Any @serializeAs(type: [STRING, BOOLEAN, INT, FLOAT, OBJECT, LIST]) @specifiedBy(url: "https://scalars.graphql.org/chillicream/any.html") interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_71ca1710_1 { nestedObject diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_NullValue.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_NullValue.yaml index d7dff5209dd..eb5568ecf6e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_NullValue.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_NullValue.yaml @@ -54,6 +54,7 @@ sourceSchemas: scalar Any @serializeAs(type: [STRING, BOOLEAN, INT, FLOAT, OBJECT, LIST]) @specifiedBy(url: "https://scalars.graphql.org/chillicream/any.html") interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_9fcebbfa_1 { nullValue diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_Object.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_Object.yaml index 1cb0ff76ace..770e05f99e4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_Object.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_Object.yaml @@ -56,6 +56,7 @@ sourceSchemas: scalar Any @serializeAs(type: [STRING, BOOLEAN, INT, FLOAT, OBJECT, LIST]) @specifiedBy(url: "https://scalars.graphql.org/chillicream/any.html") interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_59cc776c_1 { object diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ObjectWithLists.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ObjectWithLists.yaml index 75ef191fe02..b133ef617d2 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ObjectWithLists.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_ObjectWithLists.yaml @@ -66,6 +66,7 @@ sourceSchemas: scalar Any @serializeAs(type: [STRING, BOOLEAN, INT, FLOAT, OBJECT, LIST]) @specifiedBy(url: "https://scalars.graphql.org/chillicream/any.html") interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_224615af_1 { objectWithLists diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_SimpleValues.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_SimpleValues.yaml index 611f112de49..792e3c49bf4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_SimpleValues.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/AnyScalarTests.Handle_Any_Scalar_SimpleValues.yaml @@ -60,6 +60,7 @@ sourceSchemas: scalar Any @serializeAs(type: [STRING, BOOLEAN, INT, FLOAT, OBJECT, LIST]) @specifiedBy(url: "https://scalars.graphql.org/chillicream/any.html") interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_ecea57a1_1 { simpleValues diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Ensure_String_Literals_Can_Be_Empty.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Ensure_String_Literals_Can_Be_Empty.yaml index 8dd89b85cc6..dcf5ec54eb8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Ensure_String_Literals_Can_Be_Empty.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Ensure_String_Literals_Can_Be_Empty.yaml @@ -65,6 +65,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_db37b9bf_1 { formatTitle(title: "") diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Ensure_String_Variables_Can_Be_Empty.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Ensure_String_Variables_Can_Be_Empty.yaml index 791b5475908..789041b32b4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Ensure_String_Variables_Can_Be_Empty.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Ensure_String_Variables_Can_Be_Empty.yaml @@ -71,6 +71,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_577373a9_1( $s: String! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1.yaml index c30ce379966..f804149d8e1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1.yaml @@ -71,6 +71,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_da31ef9b_1 { bookById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_And_Author_From_SourceSchema2.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_And_Author_From_SourceSchema2.yaml index c07c400d3ff..ba26223aaf7 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_And_Author_From_SourceSchema2.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_And_Author_From_SourceSchema2.yaml @@ -75,6 +75,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b15d3abc_1 { bookById(id: 1) { @@ -152,6 +153,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b15d3abc_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_Two_Requests.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_Two_Requests.yaml index dd04f2c9fba..c2cd6206963 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_Two_Requests.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_Two_Requests.yaml @@ -71,6 +71,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_da31ef9b_1 { bookById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_From_SourceSchema1_And_Authors_From_SourceSchema2.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_From_SourceSchema1_And_Authors_From_SourceSchema2.yaml index ce369ba7900..010b0862b58 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_From_SourceSchema1_And_Authors_From_SourceSchema2.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_From_SourceSchema1_And_Authors_From_SourceSchema2.yaml @@ -104,6 +104,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e1aceb9e_1 { books { @@ -210,6 +211,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_e1aceb9e_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1.yaml index d63a5517b0c..96ad99ba6cc 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1.yaml @@ -84,6 +84,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6721fc4f_1 { books { @@ -175,6 +176,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_6721fc4f_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1_Three_Times.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1_Three_Times.yaml index 05dcb39baa6..17f74e1df91 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1_Three_Times.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1_Three_Times.yaml @@ -84,6 +84,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6721fc4f_1 { books { @@ -175,6 +176,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_6721fc4f_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1_X_Times.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1_X_Times.yaml index fd14105f2aa..7c5930ffd37 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1_X_Times.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Requirements_To_SourceSchema1_X_Times.yaml @@ -84,6 +84,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6721fc4f_1 { books { @@ -175,6 +176,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_6721fc4f_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_And_First_Is_1.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_And_First_Is_1.yaml index 33088fefb94..64979f1c64d 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_And_First_Is_1.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_And_First_Is_1.yaml @@ -89,6 +89,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetBooks_f1bed549_1( $first: Int @@ -180,6 +181,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetBooks_f1bed549_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_And_First_Omitted.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_And_First_Omitted.yaml index 759ff9d9f5b..8bb98209b00 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_And_First_Omitted.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_And_First_Omitted.yaml @@ -108,6 +108,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetBooks_f1bed549_1( $first: Int @@ -218,6 +219,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetBooks_f1bed549_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_Last_And_First_1_And_Last_Omitted.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_Last_And_First_1_And_Last_Omitted.yaml index 7f25b187155..3ed6eda8699 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_Last_And_First_1_And_Last_Omitted.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Books_With_Variable_First_Last_And_First_1_And_Last_Omitted.yaml @@ -90,6 +90,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetBooks_938ff9c0_1( $first: Int @@ -182,6 +183,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetBooks_938ff9c0_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/CancellationTests.Http_Request_To_Source_Schema_Hits_HttpClient_Timeout.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/CancellationTests.Http_Request_To_Source_Schema_Hits_HttpClient_Timeout.yaml index a645d64ad3b..06625cd0795 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/CancellationTests.Http_Request_To_Source_Schema_Hits_HttpClient_Timeout.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/CancellationTests.Http_Request_To_Source_Schema_Hits_HttpClient_Timeout.yaml @@ -38,6 +38,7 @@ sourceSchemas: isTimingOut: true interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_486d07e5_1 { topProduct { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/CancellationTests.Request_Is_Running_Into_Execution_Timeout_While_Http_Request_In_Node_Is_Still_Ongoing.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/CancellationTests.Request_Is_Running_Into_Execution_Timeout_While_Http_Request_In_Node_Is_Still_Ongoing.yaml index 1ed4b744a47..a519b32464c 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/CancellationTests.Request_Is_Running_Into_Execution_Timeout_While_Http_Request_In_Node_Is_Still_Ongoing.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/CancellationTests.Request_Is_Running_Into_Execution_Timeout_While_Http_Request_In_Node_Is_Still_Ongoing.yaml @@ -35,6 +35,7 @@ sourceSchemas: isTimingOut: true interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_486d07e5_1 { topProduct { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.All_Selections_On_A_Field_Statically_Skipped.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.All_Selections_On_A_Field_Statically_Skipped.yaml index 775b56fea3e..33016902c10 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.All_Selections_On_A_Field_Statically_Skipped.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.All_Selections_On_A_Field_Statically_Skipped.yaml @@ -30,6 +30,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_0abed161_1 { productBySlug(slug: "product") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup.yaml index a9221508f6e..7e7a009dbd5 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup.yaml @@ -54,6 +54,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_321bae46_1( $skip1: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup_And_On_Same_Source_Schema.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup_And_On_Same_Source_Schema.yaml index 5d7a9d0d833..a34155a7c3c 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup_And_On_Same_Source_Schema.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Multiple_Skip_Levels_Around_Fields_Fetched_Through_Lookup_And_On_Same_Source_Schema.yaml @@ -57,6 +57,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_28ca75a0_1( $skip1: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Around_Field_With_Requirement_With_Other_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Around_Field_With_Requirement_With_Other_Field.yaml index f47b66b7dbb..3cb788049a3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Around_Field_With_Requirement_With_Other_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Around_Field_With_Requirement_With_Other_Field.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c97c6b3f_1( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Around_Fields_Fetched_Through_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Around_Fields_Fetched_Through_Lookup.yaml index 35c8761c53d..849889fbced 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Around_Fields_Fetched_Through_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Around_Fields_Fetched_Through_Lookup.yaml @@ -50,6 +50,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_3ac8a246_1( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Not_Only_On_Field_With_Requirement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Not_Only_On_Field_With_Requirement.yaml index 4d2edfe4c5b..ae680144b83 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Not_Only_On_Field_With_Requirement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Not_Only_On_Field_With_Requirement.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_3197e72d_1 { productBySlug(slug: "product") { @@ -85,6 +86,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_3197e72d_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Field_Fetched_Through_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Field_Fetched_Through_Lookup.yaml index 87fd87cc3dd..8ed60e6dda2 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Field_Fetched_Through_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Field_Fetched_Through_Lookup.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c8d03103_1 { productBySlug(slug: "product") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Field_With_Requirement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Field_With_Requirement.yaml index bc54f8213ff..8fdd2fb1079 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Field_With_Requirement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Field_With_Requirement.yaml @@ -35,6 +35,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_1a5d8806_1 { productBySlug(slug: "product") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Parent_Field_Of_Field_Fetched_Through_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Parent_Field_Of_Field_Fetched_Through_Lookup.yaml index 0a9606b4240..18bba3d98b7 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Parent_Field_Of_Field_Fetched_Through_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_On_Parent_Field_Of_Field_Fetched_Through_Lookup.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_dcf2affd_1( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Only_On_Some_Fields_Fetched_Through_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Only_On_Some_Fields_Fetched_Through_Lookup.yaml index cd3fc67838e..1ebfac864d4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Only_On_Some_Fields_Fetched_Through_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Lookup_Skip_Only_On_Some_Fields_Fetched_Through_Lookup.yaml @@ -50,6 +50,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_8a7e6c10_1 { productBySlug(slug: "product") { @@ -89,6 +90,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_8a7e6c10_2( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Interface_Type_Refinement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Interface_Type_Refinement.yaml index e6cf609b576..730b6d61091 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Interface_Type_Refinement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Interface_Type_Refinement.yaml @@ -61,6 +61,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_f0a0d960_3( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Multiple_Type_Refinements.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Multiple_Type_Refinements.yaml index 66aa6b12688..6762ab5107a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Multiple_Type_Refinements.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Multiple_Type_Refinements.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_235aa91a_3( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Shared_Selections.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Shared_Selections.yaml index 9d84167898c..f635ee9a88e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Shared_Selections.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_Around_Shared_Selections.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_61fcbd49_3( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Selection.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Selection.yaml index 579a6c9ebcd..b9cd556af89 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Selection.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Selection.yaml @@ -58,6 +58,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_7ae73f43_3( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Selection_Type_Refinement_With_Same_Unskipped_Selection.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Selection_Type_Refinement_With_Same_Unskipped_Selection.yaml index 8ec9e4036d4..cfb1da85703 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Selection_Type_Refinement_With_Same_Unskipped_Selection.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Selection_Type_Refinement_With_Same_Unskipped_Selection.yaml @@ -57,6 +57,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_ff22954e_3( $skip: Boolean! @@ -108,6 +109,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_ff22954e_4( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Type_Refinement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Type_Refinement.yaml index ca86abe8ba7..dbb0e6bc8a6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Type_Refinement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Interface_Type_Refinement.yaml @@ -52,6 +52,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_eaa5be75_3( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Selection_In_Type_Refinement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Selection_In_Type_Refinement.yaml index 604b5b4b88d..c7fff1e3ebf 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Selection_In_Type_Refinement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Selection_In_Type_Refinement.yaml @@ -45,6 +45,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_56cd9653_3( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Shared_Selection.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Shared_Selection.yaml index b25ad71e0cf..3f30992df97 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Shared_Selection.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Shared_Selection.yaml @@ -45,6 +45,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_4a9f6178_3( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Type_Refinement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Type_Refinement.yaml index f4084a874bc..38e47856701 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Type_Refinement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.NodeField_Skip_On_Type_Refinement.yaml @@ -45,6 +45,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_fbcbdaf4_3( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Root_Skip_Only_On_Some_Fields_From_Different_Source_Schemas.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Root_Skip_Only_On_Some_Fields_From_Different_Source_Schemas.yaml index cb49ce2e3ea..6afea1995fc 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Root_Skip_Only_On_Some_Fields_From_Different_Source_Schemas.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Root_Skip_Only_On_Some_Fields_From_Different_Source_Schemas.yaml @@ -54,6 +54,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_d58c3d50_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Root_Skip_Only_On_Some_Fields_Of_Same_Source_Schema.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Root_Skip_Only_On_Some_Fields_Of_Same_Source_Schema.yaml index 283cbd53289..885dd1ec51f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Root_Skip_Only_On_Some_Fields_Of_Same_Source_Schema.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.Root_Skip_Only_On_Some_Fields_Of_Same_Source_Schema.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_d58c3d50_1( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.SharedPath_Multiple_Skip_Levels_Around_Fields_Below_Entry_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.SharedPath_Multiple_Skip_Levels_Around_Fields_Below_Entry_Field.yaml index d719bec7a59..62ce68e78cf 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.SharedPath_Multiple_Skip_Levels_Around_Fields_Below_Entry_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.SharedPath_Multiple_Skip_Levels_Around_Fields_Below_Entry_Field.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c099bff0_1( $skip1: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.SharedPath_Skip_On_Field_Below_Entry_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.SharedPath_Skip_On_Field_Below_Entry_Field.yaml index 9841d643368..e743e96a718 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.SharedPath_Skip_On_Field_Below_Entry_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/ConditionalTests.SharedPath_Skip_On_Field_Below_Entry_Field.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c549857e_1 { viewer { @@ -69,6 +70,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c549857e_2( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files.yaml index 6f58deaa646..5bbeb609e05 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files.yaml @@ -91,6 +91,7 @@ sourceSchemas: scalar Upload @serializeAs(type: STRING) interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 contentType: multipart/form-data; boundary="f56524ab-5626-4955-b296-234a097b44f6" body: | --f56524ab-5626-4955-b296-234a097b44f6 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files_In_Input_Object.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files_In_Input_Object.yaml index 22032590dc4..64fd08e036e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files_In_Input_Object.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files_In_Input_Object.yaml @@ -91,6 +91,7 @@ sourceSchemas: scalar Upload @serializeAs(type: STRING) interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 contentType: multipart/form-data; boundary="f56524ab-5626-4955-b296-234a097b44f6" body: | --f56524ab-5626-4955-b296-234a097b44f6 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files_In_Input_Object_Inline.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files_In_Input_Object_Inline.yaml index 79c2f624125..f5b8b4aa80a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files_In_Input_Object_Inline.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_List_Of_Files_In_Input_Object_Inline.yaml @@ -91,6 +91,7 @@ sourceSchemas: scalar Upload @serializeAs(type: STRING) interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 contentType: multipart/form-data; boundary="f56524ab-5626-4955-b296-234a097b44f6" body: | --f56524ab-5626-4955-b296-234a097b44f6 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File.yaml index 563606dc0da..fd25994210b 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File.yaml @@ -79,6 +79,7 @@ sourceSchemas: scalar Upload @serializeAs(type: STRING) interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 contentType: multipart/form-data; boundary="f56524ab-5626-4955-b296-234a097b44f6" body: | --f56524ab-5626-4955-b296-234a097b44f6 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File_In_Input_Object.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File_In_Input_Object.yaml index 7b05d33ff16..6d6122915e3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File_In_Input_Object.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File_In_Input_Object.yaml @@ -79,6 +79,7 @@ sourceSchemas: scalar Upload @serializeAs(type: STRING) interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 contentType: multipart/form-data; boundary="f56524ab-5626-4955-b296-234a097b44f6" body: | --f56524ab-5626-4955-b296-234a097b44f6 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File_In_Input_Object_Inline.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File_In_Input_Object_Inline.yaml index 6027c2b7c6f..886afe11f0e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File_In_Input_Object_Inline.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/FileUploadTests.Upload_Single_File_In_Input_Object_Inline.yaml @@ -79,6 +79,7 @@ sourceSchemas: scalar Upload @serializeAs(type: STRING) interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 contentType: multipart/form-data; boundary="f56524ab-5626-4955-b296-234a097b44f6" body: | --f56524ab-5626-4955-b296-234a097b44f6 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Concrete_Type_Branch_Requested.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Concrete_Type_Branch_Requested.yaml index 2909418440a..35c326d1fba 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Concrete_Type_Branch_Requested.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Concrete_Type_Branch_Requested.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e567807e_3 { node: discussionById(discussionId: "RGlzY3Vzc2lvbjox") { @@ -87,6 +88,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e567807e_4( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Concrete_Type_Branch_Requested_Abstract_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Concrete_Type_Branch_Requested_Abstract_Lookup.yaml index d1ecc7c4afd..98ee8d62728 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Concrete_Type_Branch_Requested_Abstract_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Concrete_Type_Branch_Requested_Abstract_Lookup.yaml @@ -65,6 +65,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_f71a6d9f_3 { node(id: "UHJvZHVjdDox") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Id_Of_Type_Different_From_Concrete_Type_Selections_Requested.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Id_Of_Type_Different_From_Concrete_Type_Selections_Requested.yaml index fbeda6f95a9..be36c6ec141 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Id_Of_Type_Different_From_Concrete_Type_Selections_Requested.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Id_Of_Type_Different_From_Concrete_Type_Selections_Requested.yaml @@ -64,6 +64,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_83aee782_2 { node(id: "UHJvZHVjdDox") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.No_By_Id_Lookup_On_Best_Matching_Source_Schema.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.No_By_Id_Lookup_On_Best_Matching_Source_Schema.yaml deleted file mode 100644 index 7f55792f76c..00000000000 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.No_By_Id_Lookup_On_Best_Matching_Source_Schema.yaml +++ /dev/null @@ -1,161 +0,0 @@ -title: No_By_Id_Lookup_On_Best_Matching_Source_Schema -request: - document: | - { - node(id: "RGlzY3Vzc2lvbjox") { - ... on Discussion { - commentCount - } - } - } -response: - body: | - { - "data": { - "node": { - "commentCount": 123 - } - } - } -sourceSchemas: - - name: A - schema: | - schema { - query: Query - } - - type Discussion @key(fields: "id") { - id: ID! - title: String! - commentCount: Int! - } - - type Query { - discussionByName(title: String! @is(field: "title")): Discussion @lookup - } - interactions: - - request: - document: | - query Op_7c1d9f5d_4( - $__fusion_1_title: String! - ) { - discussionByName(title: $__fusion_1_title) { - commentCount - } - } - variables: | - { - "__fusion_1_title": "Discussion: RGlzY3Vzc2lvbjox" - } - response: - results: - - | - { - "data": { - "discussionByName": { - "commentCount": 123 - } - } - } - - name: B - schema: | - schema { - query: Query - } - - interface Node { - id: ID! - } - - type Discussion implements Node @key(fields: "title") { - id: ID! - title: String! - } - - type Query { - node(id: ID!): Node @lookup - discussionById(discussionId: ID! @is(field: "id")): Discussion @lookup - } - interactions: - - request: - document: | - query Op_7c1d9f5d_3 { - node: discussionById(discussionId: "RGlzY3Vzc2lvbjox") { - __typename - title - } - } - response: - results: - - | - { - "data": { - "node": { - "__typename": "Discussion", - "title": "Discussion: RGlzY3Vzc2lvbjox" - } - } - } -operationPlan: - operation: - - document: | - { - node(id: "RGlzY3Vzc2lvbjox") { - __typename @fusion__requirement - ... on Discussion { - commentCount - } - title @fusion__requirement - } - } - hash: 7c1d9f5dd3eeed1783d0c9fbdc80eebf - searchSpace: 1 - nodes: - - id: 1 - type: Node - idValue: "RGlzY3Vzc2lvbjox" - responseName: node - branches: - - Discussion: 3 - fallback: 2 - - id: 2 - type: Operation - operation: | - query Op_7c1d9f5d_2 { - node(id: "RGlzY3Vzc2lvbjox") { - __typename - } - } - dependencies: - - id: 1 - - id: 3 - type: Operation - schema: B - operation: | - query Op_7c1d9f5d_3 { - node: discussionById(discussionId: "RGlzY3Vzc2lvbjox") { - __typename - title - } - } - dependencies: - - id: 1 - - id: 4 - type: Operation - schema: A - operation: | - query Op_7c1d9f5d_4( - $__fusion_1_title: String! - ) { - discussionByName(title: $__fusion_1_title) { - commentCount - } - } - source: $.discussionByName - target: $.node - requirements: - - name: __fusion_1_title - selectionMap: >- - title - dependencies: - - id: 3 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Alongside_Regular_Root_Selections.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Alongside_Regular_Root_Selections.yaml index 4da938dd415..5c23a77a65f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Alongside_Regular_Root_Selections.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Alongside_Regular_Root_Selections.yaml @@ -57,6 +57,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_a938b4c5_3( $id: ID! @@ -85,6 +86,7 @@ sourceSchemas: } } - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_a938b4c5_4 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Concrete_Type_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Concrete_Type_Has_Dependency.yaml index fa570441500..3bd35ce7a51 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Concrete_Type_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Concrete_Type_Has_Dependency.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_6945dbce_3( $id: ID! @@ -95,6 +96,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_6945dbce_4( $__fusion_1_discussionId: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Concrete_Type_Selection_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Concrete_Type_Selection_Has_Dependency.yaml index b6f5dc2b0ff..c8a7ee25d52 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Concrete_Type_Selection_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Concrete_Type_Selection_Has_Dependency.yaml @@ -58,6 +58,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_163be4ff_3( $id: ID! @@ -110,6 +111,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_163be4ff_4( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface.yaml index 7d373b2ccfb..fb15acec001 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface.yaml @@ -54,6 +54,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_63ca3aaf_3( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type.yaml index e1ffe14be58..6774898fc9b 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type.yaml @@ -58,6 +58,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_ef8b97ff_3( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Different_Dependencies.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Different_Dependencies.yaml index 4452339dfaf..9b62d3067d0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Different_Dependencies.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Different_Dependencies.yaml @@ -86,6 +86,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_f7a0a31d_3( $id: ID! @@ -153,6 +154,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_f7a0a31d_4( $__fusion_1_id: ID! @@ -180,6 +182,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_f7a0a31d_5( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Same_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Same_Dependency.yaml index b82eacf9d26..93c1c21ed67 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Same_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_And_Concrete_Type_Both_Have_Same_Dependency.yaml @@ -67,6 +67,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_648537b2_3( $id: ID! @@ -120,6 +121,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_648537b2_4( $__fusion_1_id: ID! @@ -143,6 +145,7 @@ sourceSchemas: } } - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_648537b2_5( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_Selection_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_Selection_Has_Dependency.yaml index a1c8ae78361..661f7149839 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_Selection_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Selections_On_Interface_Selection_Has_Dependency.yaml @@ -73,6 +73,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_70eb1308_5( $id: ID! @@ -134,6 +135,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_70eb1308_6( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Two_Concrete_Types_Selections_Have_Different_Dependencies.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Two_Concrete_Types_Selections_Have_Different_Dependencies.yaml index 5f9bc0b5e49..9cc53d96d32 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Two_Concrete_Types_Selections_Have_Different_Dependencies.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Two_Concrete_Types_Selections_Have_Different_Dependencies.yaml @@ -59,6 +59,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c0cdf5d7_5( $id: ID! @@ -132,6 +133,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c0cdf5d7_6( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Two_Concrete_Types_Selections_Have_Same_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Two_Concrete_Types_Selections_Have_Same_Dependency.yaml index 3f409803dd6..888a9082a90 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Two_Concrete_Types_Selections_Have_Same_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Node_Field_Two_Concrete_Types_Selections_Have_Same_Dependency.yaml @@ -57,6 +57,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_7a72a6b2_5( $id: ID! @@ -130,6 +131,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_7a72a6b2_6( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_Id_And_Typename_Selected.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_Id_And_Typename_Selected.yaml index cf32fc195b8..6d79fab72c0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_Id_And_Typename_Selected.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_Id_And_Typename_Selected.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e41649ee_2 { node(id: "RGlzY3Vzc2lvbjox") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_TypeName_Selected_On_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_TypeName_Selected_On_Concrete_Type.yaml index 2bde47c79e3..1c5833ecc2a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_TypeName_Selected_On_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_TypeName_Selected_On_Concrete_Type.yaml @@ -39,6 +39,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_72167d7d_3 { node: discussionById(discussionId: "RGlzY3Vzc2lvbjox") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_Typename_Selected.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_Typename_Selected.yaml index 6930438a1a8..08896cca6a6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_Typename_Selected.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Only_Typename_Selected.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_539ebaa0_2( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Two_Node_Fields_With_Alias.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Two_Node_Fields_With_Alias.yaml index e349c26ce55..c85676ebb02 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Two_Node_Fields_With_Alias.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/GlobalObjectIdentificationTests.Two_Node_Fields_With_Alias.yaml @@ -49,6 +49,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_a361113f_3 { b: discussionById(discussionId: "RGlzY3Vzc2lvbjoy") { @@ -70,6 +71,7 @@ sourceSchemas: } } - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_a361113f_7 { a: discussionById(discussionId: "RGlzY3Vzc2lvbjox") { @@ -109,6 +111,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_a361113f_4( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Enum_With_Inaccessible_Value_When_Accessible_Value_Is_Used.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Enum_With_Inaccessible_Value_When_Accessible_Value_Is_Used.yaml index 7a291504a0b..cec32ab5c82 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Enum_With_Inaccessible_Value_When_Accessible_Value_Is_Used.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Enum_With_Inaccessible_Value_When_Accessible_Value_Is_Used.yaml @@ -61,6 +61,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_4d7bd59e_1 { enumField(value: ITEM2) diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Field_With_Inaccessible_Argument_Can_Be_Queried.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Field_With_Inaccessible_Argument_Can_Be_Queried.yaml index 34e70bdc463..a4621a28f06 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Field_With_Inaccessible_Argument_Can_Be_Queried.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Field_With_Inaccessible_Argument_Can_Be_Queried.yaml @@ -35,6 +35,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_7f497f67_1 { inaccessibleText diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Can_Be_Used_As_Requirements.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Can_Be_Used_As_Requirements.yaml index 65f60c337b9..02871c5c254 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Can_Be_Used_As_Requirements.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Can_Be_Used_As_Requirements.yaml @@ -43,6 +43,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_2f49c6c6_1 { bookById(id: 1) { @@ -91,6 +92,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_2f49c6c6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Input_With_Inaccessible_Field_When_Accessible_Field_Is_Passed.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Input_With_Inaccessible_Field_When_Accessible_Field_Is_Passed.yaml index fbfeb092fec..83c3ddfe1c5 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Input_With_Inaccessible_Field_When_Accessible_Field_Is_Passed.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Input_With_Inaccessible_Field_When_Accessible_Field_Is_Passed.yaml @@ -61,6 +61,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_8f2de74d_1 { shareable(input: { a: "Hello" }) diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntegrationTests.Recursive_Input_Object_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntegrationTests.Recursive_Input_Object_Type.yaml index 17ebc236a91..fe7b1a09a69 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntegrationTests.Recursive_Input_Object_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntegrationTests.Recursive_Input_Object_Type.yaml @@ -35,6 +35,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_4b201a4f_1( $input: RecursiveInput! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field.yaml index 071997715a0..7f665708e5f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_79461fa4_1 { votable { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type.yaml index 5fe49d3a2d3..1c9037808bd 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_f4fa964e_1 { votable { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_Linked_Field_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_Linked_Field_With_Dependency.yaml index 7fd82767770..01be4b49151 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_Linked_Field_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_Linked_Field_With_Dependency.yaml @@ -54,6 +54,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_b4cd91a7_1 { votable { @@ -96,6 +97,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_b4cd91a7_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_With_Dependency.yaml index dc501bac1f3..612648bedf0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_With_Dependency.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_4a61c641_1 { votable { @@ -84,6 +85,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_4a61c641_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency.yaml index 5cf5cfc59a7..aae3082bb80 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency.yaml @@ -49,6 +49,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_d44063d8_1 { authorable { @@ -87,6 +88,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_d44063d8_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml index 33cb7008e16..3caff0e2c3f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml @@ -55,6 +55,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_1703e95b_1 { authorable { @@ -99,6 +100,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml index 0c530caafeb..07a61839a37 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml @@ -55,6 +55,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_77a61d25_1 { authorable { @@ -98,6 +99,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_77a61d25_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Only_Type_Refinements_Exclusive_To_Other_Schema.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Only_Type_Refinements_Exclusive_To_Other_Schema.yaml index c37b3e0fef9..5c9b324d424 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Only_Type_Refinements_Exclusive_To_Other_Schema.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Only_Type_Refinements_Exclusive_To_Other_Schema.yaml @@ -36,6 +36,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_405afc94_1 { someField { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Only_Type_Refinements_On_Same_Schema.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Only_Type_Refinements_On_Same_Schema.yaml index 08c61ff1edb..e7e6ea738ca 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Only_Type_Refinements_On_Same_Schema.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Only_Type_Refinements_On_Same_Schema.yaml @@ -40,6 +40,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_4d0b2677_1 { someField { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Type_Refinements_Exclusive_To_Other_Schema.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Type_Refinements_Exclusive_To_Other_Schema.yaml index 28d02caaa66..4d1c9562c9c 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Type_Refinements_Exclusive_To_Other_Schema.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_Field_With_Type_Refinements_Exclusive_To_Other_Schema.yaml @@ -43,6 +43,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_cb97e457_1 { someField { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field.yaml index c9e63915c99..86ee1c40d7b 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field.yaml @@ -50,6 +50,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_1284c0cb_1 { votables { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type.yaml index 6bf7284bf02..d5f93b30505 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type.yaml @@ -55,6 +55,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_00fdde4e_1 { votables { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type_Linked_Field_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type_Linked_Field_With_Dependency.yaml index 97fb9fd5ce7..7f3101aab06 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type_Linked_Field_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type_Linked_Field_With_Dependency.yaml @@ -65,6 +65,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_e3932333_1 { votables { @@ -120,6 +121,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_e3932333_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type_With_Dependency.yaml index 13c30b9830d..7d90d441a05 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type_With_Dependency.yaml @@ -55,6 +55,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c8aa487a_1 { votables { @@ -104,6 +105,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_c8aa487a_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency.yaml index b34af53f0eb..41a99c4c175 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency.yaml @@ -63,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_171db7a7_1 { authorables { @@ -115,6 +116,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_171db7a7_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml index a6f0436c9df..580230c01e2 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml @@ -70,6 +70,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_e4ba4706_1 { authorables { @@ -128,6 +129,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml index 309910f16d3..3aae448eef4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.Interface_List_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml @@ -69,6 +69,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_61febe16_1 { authorables { @@ -126,6 +127,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_61febe16_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type.yaml index 5ca4f799615..a90a090fe35 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type.yaml @@ -68,6 +68,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_877cb4f8_1 { wrappers { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type_Linked_Field_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type_Linked_Field_With_Dependency.yaml index fd3d2b8f68e..64c9b7e4e35 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type_Linked_Field_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type_Linked_Field_With_Dependency.yaml @@ -80,6 +80,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_8c4ceb7d_1 { wrappers { @@ -146,6 +147,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_8c4ceb7d_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type_With_Dependency.yaml index 3aae5ec41fc..d17ea256f64 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Concrete_Type_With_Dependency.yaml @@ -68,6 +68,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_7a8e1f91_1 { wrappers { @@ -126,6 +127,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_7a8e1f91_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency.yaml index beac5a9cdba..2e9c2ed4d9e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency.yaml @@ -71,6 +71,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_bdd3c6f6_1 { wrappers { @@ -131,6 +132,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_bdd3c6f6_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml index 5bc662abc91..6a94042d049 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml @@ -79,6 +79,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_a7ffad65_1 { wrappers { @@ -145,6 +146,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml index a1cab69b11b..a0577293b60 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InterfaceTests.List_Field_Interface_Object_Property_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml @@ -76,6 +76,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_4bfbec17_1 { wrappers { @@ -141,6 +142,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_4bfbec17_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Object.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Object.yaml index 88ccced0dc5..69ac21f4122 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Object.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Object.yaml @@ -83,6 +83,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_710e4ed3_1 { books { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Object_With_Alias.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Object_With_Alias.yaml index 3c269188d3f..575711ab1d1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Object_With_Alias.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Object_With_Alias.yaml @@ -83,6 +83,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_01be2e0f_1 { books { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/Issue7996Tests.Mutation_Returned_Viewer_Can_Resolve_Field_From_Another_Subgraph.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/Issue7996Tests.Mutation_Returned_Viewer_Can_Resolve_Field_From_Another_Subgraph.yaml index dbfe6ceace4..498d27bd2cc 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/Issue7996Tests.Mutation_Returned_Viewer_Can_Resolve_Field_From_Another_Subgraph.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/Issue7996Tests.Mutation_Returned_Viewer_Can_Resolve_Field_From_Another_Subgraph.yaml @@ -49,6 +49,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | mutation Op_f2f24951_1 { doSomething { @@ -86,6 +87,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_f2f24951_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_From_Nested_Internal_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_From_Nested_Internal_Lookup.yaml index 7a9b651d8a9..c31acea5f1f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_From_Nested_Internal_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_From_Nested_Internal_Lookup.yaml @@ -58,6 +58,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_76f18599_1 { books { @@ -115,6 +116,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_76f18599_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_OneOf_Lookup_With_Id.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_OneOf_Lookup_With_Id.yaml index 7174ce0bdb5..c45c82fe1b3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_OneOf_Lookup_With_Id.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_OneOf_Lookup_With_Id.yaml @@ -63,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_fb4f667e_1 { books { @@ -128,6 +129,7 @@ sourceSchemas: directive @oneOf on INPUT_OBJECT interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_fb4f667e_2( $__fusion_1_by: AuthorByInput! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_OneOf_Lookup_With_Name.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_OneOf_Lookup_With_Name.yaml index a06e19a5d08..c06d9d7be36 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_OneOf_Lookup_With_Name.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_OneOf_Lookup_With_Name.yaml @@ -65,6 +65,7 @@ sourceSchemas: directive @oneOf on INPUT_OBJECT interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_54ef22d5_2( $__fusion_1_by: AuthorByInput! @@ -108,6 +109,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_54ef22d5_1 { topAuthor { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonArray.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonArray.yaml similarity index 92% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonArray.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonArray.yaml index 96d9e5ee62b..c0d7df64db8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonArray.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonArray.yaml @@ -1,4 +1,4 @@ -title: Fetch_With_Request_Batching_JsonArray +title: Fetch_With_ApolloRequestBatching_JsonArray request: document: | { @@ -63,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_fb4f667e_1 { books { @@ -116,6 +117,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonLines.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonLines.yaml similarity index 94% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonLines.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonLines.yaml index fd301d7fc68..71de83b9b78 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonLines.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonLines.yaml @@ -1,4 +1,4 @@ -title: Fetch_With_Request_Batching_JsonLines +title: Fetch_With_ApolloRequestBatching_JsonLines request: document: | { @@ -63,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_fb4f667e_1 { books { @@ -116,6 +117,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonLines_Large_Response.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonLines_Large_Response.yaml similarity index 99% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonLines_Large_Response.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonLines_Large_Response.yaml index ac1c869e037..51f6e408674 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonLines_Large_Response.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_JsonLines_Large_Response.yaml @@ -1,4 +1,4 @@ -title: Fetch_With_Request_Batching_JsonLines_Large_Response +title: Fetch_With_ApolloRequestBatching_JsonLines_Large_Response request: document: | { @@ -63,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_0e997261_1 { books { @@ -116,6 +117,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_SSE.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_SSE.yaml similarity index 94% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_SSE.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_SSE.yaml index 3ef32b098e3..5d417f6ab14 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_SSE.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_SSE.yaml @@ -1,4 +1,4 @@ -title: Fetch_With_Request_Batching_SSE +title: Fetch_With_ApolloRequestBatching_SSE request: document: | { @@ -63,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_fb4f667e_1 { books { @@ -116,6 +117,7 @@ sourceSchemas: } interactions: - request: + accept: text/event-stream; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_SSE_Large_Response.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_SSE_Large_Response.yaml similarity index 99% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_SSE_Large_Response.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_SSE_Large_Response.yaml index a8a27d6bdbc..9d51dffd31a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_SSE_Large_Response.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_ApolloRequestBatching_SSE_Large_Response.yaml @@ -1,4 +1,4 @@ -title: Fetch_With_Request_Batching_SSE_Large_Response +title: Fetch_With_ApolloRequestBatching_SSE_Large_Response request: document: | { @@ -63,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_0e997261_1 { books { @@ -116,6 +117,7 @@ sourceSchemas: } interactions: - request: + accept: text/event-stream; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonArray_Large_Response.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonArray_Large_Response.yaml index 5505a789582..2b07090fab1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonArray_Large_Response.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/LookupTests.Fetch_With_Request_Batching_JsonArray_Large_Response.yaml @@ -63,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_fb4f667e_1 { books { @@ -116,6 +117,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/MutationTests.Multiple_Mutation.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/MutationTests.Multiple_Mutation.yaml index f178ebfd3f4..5365d3e0ade 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/MutationTests.Multiple_Mutation.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/MutationTests.Multiple_Mutation.yaml @@ -65,6 +65,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | mutation Op_192dc5f8_1 { a: createBook(input: { title: "Book1" }) { @@ -86,6 +87,7 @@ sourceSchemas: } } - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | mutation Op_192dc5f8_3 { b: createBook(input: { title: "Book2" }) { @@ -124,6 +126,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_192dc5f8_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/MutationTests.Single_Mutation.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/MutationTests.Single_Mutation.yaml index e7b7dab72e9..c78acb2bcae 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/MutationTests.Single_Mutation.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/MutationTests.Single_Mutation.yaml @@ -51,6 +51,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | mutation Op_8adeedac_1 { a: createBook(input: { title: "Book1" }) { @@ -87,6 +88,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_8adeedac_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/NullTests.Raise_NonNullViolation_Error_For_NonNull_Field_Being_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/NullTests.Raise_NonNullViolation_Error_For_NonNull_Field_Being_Null.yaml deleted file mode 100644 index 3b88497f149..00000000000 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/NullTests.Raise_NonNullViolation_Error_For_NonNull_Field_Being_Null.yaml +++ /dev/null @@ -1,61 +0,0 @@ -title: Raise_NonNullViolation_Error_For_NonNull_Field_Being_Null -request: - document: | - { - nonNullString - } -response: - body: | - { - "errors": [ - { - "message": "Cannot return null for non-nullable field.", - "path": [ - "nonNullString" - ], - "extensions": { - "code": "HC0018" - } - } - ] - } -sourceSchemas: - - name: A - schema: | - schema { - query: Query - } - - type Query { - nonNullString: String! - } - interactions: - - request: - document: | - query Op_ca4a0945_1 { - nonNullString - } - response: - results: - - | - { - "data": { - "nonNullString": null - } - } -operationPlan: - operation: - - document: | - { - nonNullString - } - hash: ca4a09458484ec06221f9c74efd683d1 - searchSpace: 1 - nodes: - - id: 1 - type: Operation - schema: A - operation: | - query Op_ca4a0945_1 { - nonNullString - } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Require_Enumerable_In_List.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Require_Enumerable_In_List.yaml index 796f125affa..831e4a4ffb3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Require_Enumerable_In_List.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Require_Enumerable_In_List.yaml @@ -105,6 +105,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_684e067a_1 { books { @@ -209,6 +210,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_684e067a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Require_Object_In_A_List.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Require_Object_In_A_List.yaml index 2de9cbbe6fb..5f4037ffbb9 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Require_Object_In_A_List.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Require_Object_In_A_List.yaml @@ -85,6 +85,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_1f7d6449_1 { books { @@ -138,6 +139,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_1f7d6449_4( $__fusion_4_id: Int! @@ -219,6 +221,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_1f7d6449_3( $__fusion_2_dimension: BookDimensionInput! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Leaf_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Leaf_Field.yaml index 23cb4019c2b..457716bad47 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Leaf_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Leaf_Field.yaml @@ -32,6 +32,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | @@ -93,6 +94,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b05a9c48_1 { productById(id: "1") { @@ -110,6 +112,7 @@ sourceSchemas: } } - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b05a9c48_2( $__fusion_1_nullableArgument: String diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Nullable_Leaf_Field_Returning_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Nullable_Leaf_Field_Returning_Null.yaml index 69569be3ba2..5fa6371cb43 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Nullable_Leaf_Field_Returning_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Nullable_Leaf_Field_Returning_Null.yaml @@ -32,6 +32,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | @@ -93,6 +94,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b05a9c48_1 { productById(id: "1") { @@ -110,6 +112,7 @@ sourceSchemas: } } - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b05a9c48_2( $__fusion_1_nullableArgument: String diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Property_Within_Nullable_Object.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Property_Within_Nullable_Object.yaml index 87760ce1609..4390b11ec4a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Property_Within_Nullable_Object.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Property_Within_Nullable_Object.yaml @@ -36,6 +36,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | @@ -101,6 +102,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b05a9c48_1 { productById(id: "1") { @@ -118,6 +120,7 @@ sourceSchemas: } } - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b05a9c48_2( $__fusion_1_nullableArgument: String diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Property_Within_Nullable_Object_Returning_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Property_Within_Nullable_Object_Returning_Null.yaml index fb1c3f3c5df..e31d2617b77 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Property_Within_Nullable_Object_Returning_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/RequireTests.Requirement_On_Property_Within_Nullable_Object_Returning_Null.yaml @@ -36,6 +36,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | @@ -99,6 +100,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b05a9c48_1 { productById(id: "1") { @@ -116,6 +118,7 @@ sourceSchemas: } } - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b05a9c48_2( $__fusion_1_nullableArgument: String diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Entity_Interface_With_Shared_Value_Type_Under_Inline_Fragment_Pockets_Error.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Entity_Interface_With_Shared_Value_Type_Under_Inline_Fragment_Pockets_Error.yaml index 5476d431f0e..fa42da2d896 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Entity_Interface_With_Shared_Value_Type_Under_Inline_Fragment_Pockets_Error.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Entity_Interface_With_Shared_Value_Type_Under_Inline_Fragment_Pockets_Error.yaml @@ -59,6 +59,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_854c0b21_1 { node { @@ -115,6 +116,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_854c0b21_2 { node { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Inline_Fragments_With_Duplicate_Response_Name_Should_Not_Drop_Pocketed_Error.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Inline_Fragments_With_Duplicate_Response_Name_Should_Not_Drop_Pocketed_Error.yaml index 256b7d513fe..ffb6cc24097 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Inline_Fragments_With_Duplicate_Response_Name_Should_Not_Drop_Pocketed_Error.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Inline_Fragments_With_Duplicate_Response_Name_Should_Not_Drop_Pocketed_Error.yaml @@ -66,6 +66,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e478e62b_1 { node { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_With_Error_And_NonNull_Child_Propagates_To_Parent_On_Post_Process.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_With_Error_And_NonNull_Child_Propagates_To_Parent_On_Post_Process.yaml index bb928f7f734..1eee590c591 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_With_Error_And_NonNull_Child_Propagates_To_Parent_On_Post_Process.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_With_Error_And_NonNull_Child_Propagates_To_Parent_On_Post_Process.yaml @@ -39,6 +39,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12d223a8_1 { viewer { @@ -76,6 +77,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12d223a8_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_With_Error_And_Nullable_Children_Pockets_Child_Error.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_With_Error_And_Nullable_Children_Pockets_Child_Error.yaml index b24820154e0..7d9fa8964b3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_With_Error_And_Nullable_Children_Pockets_Child_Error.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_With_Error_And_Nullable_Children_Pockets_Child_Error.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12d223a8_1 { viewer { @@ -79,6 +80,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12d223a8_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_Without_Error_And_Nullable_Children_Does_Not_Initialize_Parent.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_Without_Error_And_Nullable_Children_Does_Not_Initialize_Parent.yaml index 4c1324f392c..1f84ab205ac 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_Without_Error_And_Nullable_Children_Does_Not_Initialize_Parent.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Null_Without_Error_And_Nullable_Children_Does_Not_Initialize_Parent.yaml @@ -33,6 +33,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12d223a8_1 { viewer { @@ -62,6 +63,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12d223a8_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Remains_Uninitialized_Promotes_One_Pocketed_Error_To_Parent.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Remains_Uninitialized_Promotes_One_Pocketed_Error_To_Parent.yaml index c82380f54ea..528e325d916 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Remains_Uninitialized_Promotes_One_Pocketed_Error_To_Parent.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathErrorPocketingTests.Viewer_Remains_Uninitialized_Promotes_One_Pocketed_Error_To_Parent.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12d223a8_1 { viewer { @@ -75,6 +76,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12d223a8_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup.yaml index fe63821c2ef..26dce01534b 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup.yaml @@ -78,6 +78,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_43e07475_1 { productById(id: 1) { @@ -155,6 +156,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_43e07475_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml index 7030d1f23c2..80f8e14c5e1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml @@ -82,6 +82,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_c1c44a8c_1 { productById(id: 1) { @@ -161,6 +162,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Levels.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Levels.yaml index 64661e82d53..c6052b776d9 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Levels.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Parent_Fields_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Levels.yaml @@ -86,6 +86,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b3a5d887_1 { productById(id: 1) { @@ -167,6 +168,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Root_Fields.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Root_Fields.yaml index 0438f21ae29..c51c666f038 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Root_Fields.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Root_Fields.yaml @@ -74,6 +74,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_58df2c1b_1 { viewer { @@ -145,6 +146,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_58df2c1b_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Root_Fields_With_Extra_Fields_On_Shared_Level.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Root_Fields_With_Extra_Fields_On_Shared_Level.yaml index d6f9c9dc514..ef10252faea 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Root_Fields_With_Extra_Fields_On_Shared_Level.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Hierarchy_Of_Shared_Root_Fields_With_Extra_Fields_On_Shared_Level.yaml @@ -80,6 +80,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_2deb87e6_1 { viewer { @@ -153,6 +154,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | @@ -205,6 +207,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_2deb87e6_3 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup.yaml index 44759c9148e..b9940ee822a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup.yaml @@ -74,6 +74,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b5a406bd_1 { productById(id: 1) { @@ -147,6 +148,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b5a406bd_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml index 29e9fe95ed5..4fc227d141a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Extra_Fields_On_Shared_Level.yaml @@ -78,6 +78,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_49906eea_1 { productById(id: 1) { @@ -153,6 +154,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Type_Refinement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Type_Refinement.yaml index 7bcdd8a6c18..46d42d90a74 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Type_Refinement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Shared_Parent_Field_Below_Type_With_Lookup_With_Type_Refinement.yaml @@ -76,6 +76,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_c8e1a8bf_1 { unsharedInterface { @@ -153,6 +154,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_c8e1a8bf_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Interface_Root_Field_With_Type_Refinement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Interface_Root_Field_With_Type_Refinement.yaml index 528c08297a3..afbb0116ef5 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Interface_Root_Field_With_Type_Refinement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Interface_Root_Field_With_Type_Refinement.yaml @@ -72,6 +72,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_d8c31e9a_1 { interface { @@ -143,6 +144,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_d8c31e9a_2 { interface { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field.yaml index 6280b23035a..569b95c5cd8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field.yaml @@ -70,6 +70,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_c6e3b357_1 { viewer { @@ -137,6 +138,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_c6e3b357_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field_With_Extra_Fields_On_Root.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field_With_Extra_Fields_On_Root.yaml index c27269f636d..0a73ee78378 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field_With_Extra_Fields_On_Root.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field_With_Extra_Fields_On_Root.yaml @@ -74,6 +74,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_4a75abf3_1 { viewer { @@ -143,6 +144,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field_With_Inline_Fragment_Without_TypeCondition.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field_With_Inline_Fragment_Without_TypeCondition.yaml index 7e6033e86be..5f64545a8a0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field_With_Inline_Fragment_Without_TypeCondition.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Root_Field_With_Inline_Fragment_Without_TypeCondition.yaml @@ -78,6 +78,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_88b508ac_1( $skip: Boolean! @@ -153,6 +154,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_88b508ac_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Union_Root_Field_With_Type_Refinement.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Union_Root_Field_With_Type_Refinement.yaml index 4a64840fc7e..c8b3b006821 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Union_Root_Field_With_Type_Refinement.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SharedPathTests.Single_Shared_Union_Root_Field_With_Type_Refinement.yaml @@ -72,6 +72,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_55b9106f_1 { union { @@ -143,6 +144,7 @@ sourceSchemas: union IUnion = Product | Review interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_55b9106f_2 { union { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_Extensions_From_Source_Schema_Are_Properly_Forwarded.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_Extensions_From_Source_Schema_Are_Properly_Forwarded.yaml index 7150f30d4ba..95102f70039 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_Extensions_From_Source_Schema_Are_Properly_Forwarded.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_Extensions_From_Source_Schema_Are_Properly_Forwarded.yaml @@ -44,6 +44,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_5fcd7a62_1 { someField diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_In_List_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_In_List_OnError_Null.yaml index 7c7a8c3de2e..d44dbcfd758 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_In_List_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_In_List_OnError_Null.yaml @@ -74,6 +74,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -118,6 +119,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_In_List_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_In_List_OnError_Propagate.yaml index d73c040721b..8d9603cd9cd 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_In_List_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_In_List_OnError_Propagate.yaml @@ -73,6 +73,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -117,6 +118,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_OnError_Null.yaml index 9c35bb1a2cd..a081bc3e0e8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_OnError_Null.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -81,6 +82,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_OnError_Propagate.yaml index 87dca4073c5..f9615d44480 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Field_OnError_Propagate.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -80,6 +81,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_NonNull_OnError_Null.yaml index aa4686136b5..52336d41f8d 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_NonNull_OnError_Null.yaml @@ -74,6 +74,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -118,6 +119,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_NonNull_OnError_Propagate.yaml index f331cf0230f..2239cd54afc 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_NonNull_OnError_Propagate.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -85,6 +86,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_OnError_Null.yaml index e40b96539fe..8ef1eb4ca88 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_OnError_Null.yaml @@ -74,6 +74,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -118,6 +119,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_OnError_Propagate.yaml index ebe4eef82df..d2bf3c1f0a6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_In_List_OnError_Propagate.yaml @@ -73,6 +73,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -117,6 +118,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_NonNull_OnError_Null.yaml index fc3c1d7143f..3eef6c93375 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_NonNull_OnError_Null.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -81,6 +82,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_NonNull_OnError_Propagate.yaml index 69f58631061..ec05fdf95cc 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_NonNull_OnError_Propagate.yaml @@ -40,6 +40,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -74,6 +75,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_OnError_Null.yaml index 0391bb32266..0b965cb66e6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_OnError_Null.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -81,6 +82,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_OnError_Propagate.yaml index 14ef7940e2a..fa2de670328 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Lookup_Leaf_OnError_Propagate.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -80,6 +81,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Field_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Field_OnError_Null.yaml index 6253a125072..09f2fb80b05 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Field_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Field_OnError_Null.yaml @@ -39,6 +39,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Field_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Field_OnError_Propagate.yaml index ce3bf17531c..bb7e63a72a5 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Field_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Field_OnError_Propagate.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Leaf_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Leaf_OnError_Null.yaml index c3d569ed436..1ff106865cc 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Leaf_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Leaf_OnError_Null.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Leaf_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Leaf_OnError_Propagate.yaml index 538586d2c79..7950a93175e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Leaf_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.Error_On_Root_Leaf_OnError_Propagate.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Null.yaml index 54a8d93b965..444526b99c1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Null.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -81,6 +82,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml index 21daccdf3e6..eda79b914f6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml @@ -40,6 +40,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -74,6 +75,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Leaf_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Leaf_NonNull_OnError_Null.yaml index 11ad3380b9f..20c1461d195 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Leaf_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Leaf_NonNull_OnError_Null.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -81,6 +82,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Leaf_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Leaf_NonNull_OnError_Propagate.yaml index 6fc4a798b64..3fedb3fd239 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Leaf_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Leaf_NonNull_OnError_Propagate.yaml @@ -40,6 +40,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -74,6 +75,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Root_Field_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Root_Field_NonNull_OnError_Null.yaml index 02b9606850d..5a508090605 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Root_Field_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Root_Field_NonNull_OnError_Null.yaml @@ -39,6 +39,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Root_Field_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Root_Field_NonNull_OnError_Propagate.yaml index dd12934ce61..2d0a14512f2 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Root_Field_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Root_Field_NonNull_OnError_Propagate.yaml @@ -35,6 +35,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Lookup_Field_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Lookup_Field_NonNull_OnError_Null.yaml index 7ae56d57a71..3b77016838e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Lookup_Field_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Lookup_Field_NonNull_OnError_Null.yaml @@ -50,6 +50,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -84,6 +85,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml index 182150124a2..6486a8d90b8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml @@ -43,6 +43,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -77,6 +78,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_NonNull_OnError_Null.yaml index 771e2c6bbf1..0acfb0b3340 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_NonNull_OnError_Null.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_NonNull_OnError_Propagate.yaml index c1661cfb05a..a10de05fba2 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_NonNull_OnError_Propagate.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_OnError_Null.yaml index 8d47cb53253..9482d935a51 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_OnError_Null.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_OnError_Propagate.yaml index fbb1943bc2c..5535e381e27 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_Without_Path_For_Root_Field_OnError_Propagate.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SchemaDefault_Null_AppliesWithoutPerRequestOverride.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SchemaDefault_Null_AppliesWithoutPerRequestOverride.yaml index 2206b7feac0..96c15b68ef7 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SchemaDefault_Null_AppliesWithoutPerRequestOverride.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SchemaDefault_Null_AppliesWithoutPerRequestOverride.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97fd38fc_1 { productById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_NonNull_OnError_Null.yaml index 25851f0792d..05db37b9d4f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_NonNull_OnError_Null.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -81,6 +82,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_NonNull_OnError_Propagate.yaml index b258dc585db..01b68811ab5 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_NonNull_OnError_Propagate.yaml @@ -40,6 +40,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_1 { topProduct { @@ -74,6 +75,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e24d93b6_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_OnError_Null.yaml index bc2c638d3de..56038892b3d 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_OnError_Null.yaml @@ -47,6 +47,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12015865_1 { nullableTopProduct { @@ -81,6 +82,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12015865_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_OnError_Propagate.yaml index e909ec22ea3..0980734f8a4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_OnError_Propagate.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12015865_1 { nullableTopProduct { @@ -80,6 +81,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_12015865_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_NonNull_OnError_Null.yaml index aa36d8cd53e..29888b4a937 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_NonNull_OnError_Null.yaml @@ -74,6 +74,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -118,6 +119,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_NonNull_OnError_Propagate.yaml index 641369a6440..de89a672974 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_NonNull_OnError_Propagate.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -85,6 +86,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_OnError_Null.yaml index 78ebe77eeb3..9f32a2d9f25 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_OnError_Null.yaml @@ -74,6 +74,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -118,6 +119,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_OnError_Propagate.yaml index 56c35784df1..f289247c0e0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Lookup_On_List_OnError_Propagate.yaml @@ -73,6 +73,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_67b3f75a_1 { topProducts { @@ -117,6 +118,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_67b3f75a_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_NonNull_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_NonNull_OnError_Null.yaml index 1e96c3256a2..70ea0f2ac3f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_NonNull_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_NonNull_OnError_Null.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_1c1cf024_1 { topProduct { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_NonNull_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_NonNull_OnError_Propagate.yaml index 464cd58f170..cc2112301bd 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_NonNull_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_NonNull_OnError_Propagate.yaml @@ -38,6 +38,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_1c1cf024_1 { topProduct { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_OnError_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_OnError_Null.yaml index 25e0c6f30c9..21bf28a7469 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_OnError_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_OnError_Null.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_14c79a43_1 { nullableTopProduct { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_OnError_Propagate.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_OnError_Propagate.yaml index 82aecff3cb6..cd4281c8aa9 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_OnError_Propagate.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.SourceSchema_Request_Fails_For_Root_Field_OnError_Propagate.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_14c79a43_1 { nullableTopProduct { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SubscriptionsOverHttpStoreTests.Subscribe_Simple.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SubscriptionsOverHttpStoreTests.Subscribe_Simple.yaml index e0aaab2ac7d..91352401755 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SubscriptionsOverHttpStoreTests.Subscribe_Simple.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SubscriptionsOverHttpStoreTests.Subscribe_Simple.yaml @@ -56,6 +56,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | subscription Op_a6fc02fc_1 { onBookCreated { @@ -105,6 +106,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_a6fc02fc_2( $__fusion_1_id: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Has_Dependency.yaml index 739fecd8fdc..f5f4e62eb6f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Has_Dependency.yaml @@ -63,6 +63,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_30e5fe2d_1 { postEdges { @@ -120,6 +121,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_30e5fe2d_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selection_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selection_Has_Dependency.yaml index c10fedda205..2a6b188b0d5 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selection_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selection_Has_Dependency.yaml @@ -82,6 +82,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_1bceaa5d_1 { postEdges { @@ -149,6 +150,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_1bceaa5d_3( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml index 28dd5a13f3c..52aa1e96004 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml @@ -82,6 +82,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_4ba127ab_1 { postEdges { @@ -155,6 +156,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_4ba127ab_3( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selections_Have_Same_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selections_Have_Same_Dependency.yaml index d155adc92aa..218c1d79288 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selections_Have_Same_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_Field_Concrete_Type_Selections_Have_Same_Dependency.yaml @@ -78,6 +78,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_ec963286_1 { postEdges { @@ -145,6 +146,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_ec963286_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Has_Dependency.yaml index 720698f6d39..fe60ba58fe4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Has_Dependency.yaml @@ -87,6 +87,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_e46e034a_1 { users { @@ -174,6 +175,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_e46e034a_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selection_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selection_Has_Dependency.yaml index 0b87a59c39b..da6acbb4c38 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selection_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selection_Has_Dependency.yaml @@ -118,6 +118,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_eb2214e5_1 { users { @@ -227,6 +228,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_eb2214e5_3( $__fusion_2_id: ID! @@ -323,6 +325,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_eb2214e5_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml index 581ce9f0618..bf2c827b22e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml @@ -118,6 +118,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_42ede545_1 { users { @@ -233,6 +234,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Same_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Same_Dependency.yaml index 0b9ee1c4bbc..87fcdfa09b0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Same_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Object_List_Union_List_Concrete_Type_Selections_Have_Same_Dependency.yaml @@ -114,6 +114,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_3579b174_1 { users { @@ -223,6 +224,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_3579b174_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Has_Dependency.yaml index 1e0af2fe232..6a9eb92c5ed 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Has_Dependency.yaml @@ -43,6 +43,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_3d3597da_1 { post { @@ -82,6 +83,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_3d3597da_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selection_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selection_Has_Dependency.yaml index 4f1538bf76a..7029793245d 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selection_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selection_Has_Dependency.yaml @@ -58,6 +58,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_9f626641_1 { post { @@ -103,6 +104,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_9f626641_3( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml index c1d19a2bc2a..f35649a5e5c 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml @@ -58,6 +58,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_8891193d_1 { post { @@ -109,6 +110,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_8891193d_3( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selections_Have_Same_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selections_Have_Same_Dependency.yaml index 32f95b14a48..08aaa247dc3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selections_Have_Same_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Concrete_Type_Selections_Have_Same_Dependency.yaml @@ -54,6 +54,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_7d12de3b_1 { post { @@ -99,6 +100,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_7d12de3b_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Just_Typename_Selected.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Just_Typename_Selected.yaml index 374699c13e5..24a9b960039 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Just_Typename_Selected.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_Field_Just_Typename_Selected.yaml @@ -39,6 +39,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_a239ceba_1 { post { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Has_Dependency.yaml index d5a1f8dcfcd..5496f458c3f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Has_Dependency.yaml @@ -51,6 +51,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_7e81ce9e_1 { posts { @@ -100,6 +101,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_7e81ce9e_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selection_Has_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selection_Has_Dependency.yaml index d562d95c8d1..3eb93be7b54 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selection_Has_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selection_Has_Dependency.yaml @@ -70,6 +70,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c164a236_1 { posts { @@ -129,6 +130,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_c164a236_3( $__fusion_2_id: ID! @@ -181,6 +183,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_c164a236_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml index ebb1dfa0fff..e3c65c51f94 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selections_Have_Dependency_To_Same_Subgraph.yaml @@ -70,6 +70,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_5f4670e8_1 { posts { @@ -135,6 +136,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selections_Have_Same_Dependency.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selections_Have_Same_Dependency.yaml index 8e251c6978c..4281bed9261 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selections_Have_Same_Dependency.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/UnionTests.Union_List_Concrete_Type_Selections_Have_Same_Dependency.yaml @@ -66,6 +66,7 @@ sourceSchemas: union Post = Photo | Discussion interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_9b3b2942_1 { posts { @@ -125,6 +126,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query testQuery_9b3b2942_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.InputObject_Missing_NonNull_Field_With_Default_Value.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.InputObject_Missing_NonNull_Field_With_Default_Value.yaml index b156d7f62b5..8eca7ec6dc1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.InputObject_Missing_NonNull_Field_With_Default_Value.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.InputObject_Missing_NonNull_Field_With_Default_Value.yaml @@ -36,6 +36,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_d0958502_1( $cat: Cat! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.InputObject_Missing_Nullable_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.InputObject_Missing_Nullable_Field.yaml index 84dce8d76e5..9dfec91e373 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.InputObject_Missing_Nullable_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.InputObject_Missing_Nullable_Field.yaml @@ -36,6 +36,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_d0958502_1( $cat: Cat! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.OneOf_Only_One_Option_Provided.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.OneOf_Only_One_Option_Provided.yaml index e2efb5d03e2..afe00059526 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.OneOf_Only_One_Option_Provided.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.OneOf_Only_One_Option_Provided.yaml @@ -49,6 +49,7 @@ sourceSchemas: directive @oneOf on INPUT_OBJECT interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_6ad33e0e_1( $pet: Pet! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.String_With_Quotes.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.String_With_Quotes.yaml index c3829b752bb..db9991c06d4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.String_With_Quotes.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/VariableCoercionTests.String_With_Quotes.yaml @@ -29,6 +29,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_9dd2f586_1( $input: String! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_AutoCompose.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_AutoCompose.yaml index 8f6e8aab64c..7476700a309 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_AutoCompose.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_AutoCompose.yaml @@ -78,6 +78,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_5e956cef_2 { users { @@ -138,6 +139,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_5e956cef_1 { reviews { @@ -205,6 +207,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_5e956cef_3 { topProducts(first: 2) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_Query_TopProducts.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_Query_TopProducts.yaml index da560cb1fc8..edda72e362f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_Query_TopProducts.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_Query_TopProducts.yaml @@ -116,6 +116,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query TopProducts_c6ef3d11_3( $__fusion_2_id: ID! @@ -277,6 +278,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query TopProducts_c6ef3d11_2( $__fusion_1_id: ID! @@ -435,6 +437,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query TopProducts_c6ef3d11_1 { topProducts(first: 2) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_Query_TypeName.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_Query_TypeName.yaml index 0cc5c1169a1..54688371f5a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_Query_TypeName.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_Query_TypeName.yaml @@ -152,6 +152,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query TopProducts_b7ed3f85_2( $__fusion_1_id: ID! @@ -310,6 +311,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query TopProducts_b7ed3f85_1 { __typename diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_With_Variables.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_With_Variables.yaml index c75441a598d..6e82859a613 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_With_Variables.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_And_Products_With_Variables.yaml @@ -131,6 +131,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query TopProducts_42998eb3_1( $first: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_AutoCompose.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_AutoCompose.yaml index e8d88d7fce0..67e499ece52 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_AutoCompose.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_AutoCompose.yaml @@ -64,6 +64,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_cd73759d_2 { users { @@ -124,6 +125,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_cd73759d_1 { reviews { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Batch_Requests.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Batch_Requests.yaml index f5f0d41bfa4..a4dfcf9eda6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Batch_Requests.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Batch_Requests.yaml @@ -62,6 +62,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetUser_bc5cddd0_2( $__fusion_1_id: ID! @@ -151,6 +152,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetUser_bc5cddd0_1 { reviews { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserById.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserById.yaml index bb03bc97dd9..0d39599e588 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserById.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserById.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetUser_d81f16d6_1 { userById(id: "VXNlcjox") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserById_With_Invalid_Id_Value.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserById_With_Invalid_Id_Value.yaml index 2fb15329d4f..1f5dffe5e2e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserById_With_Invalid_Id_Value.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserById_With_Invalid_Id_Value.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetUser_3fe4ea3e_1 { userById(id: 1) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews.yaml index 440a603b8a6..0d888e45133 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews.yaml @@ -116,6 +116,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetUser_6e80578a_1 { users { @@ -145,6 +146,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetUser_6e80578a_3( $__fusion_2_id: ID! @@ -306,6 +308,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetUser_6e80578a_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews_Skip_Author.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews_Skip_Author.yaml index baeeab6f3c6..fe37e58d28c 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews_Skip_Author.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews_Skip_Author.yaml @@ -96,6 +96,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetUser_f346d273_1 { users { @@ -160,6 +161,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetUser_f346d273_2( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews_Skip_Author_ErrorField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews_Skip_Author_ErrorField.yaml index 04dcfe45a7a..c043234944e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews_Skip_Author_ErrorField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_GetUserReviews_Skip_Author_ErrorField.yaml @@ -133,6 +133,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetUser_c6f5d2d4_1 { users { @@ -162,6 +163,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetUser_c6f5d2d4_3( $__fusion_2_id: ID! @@ -333,6 +335,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetUser_c6f5d2d4_2( $skip: Boolean! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_ReviewsUser.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_ReviewsUser.yaml index 76d4e942793..dc18bda9ca8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_ReviewsUser.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Authors_And_Reviews_Query_ReviewsUser.yaml @@ -168,6 +168,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetUser_c03cccb0_2 { users { @@ -197,6 +198,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetUser_c03cccb0_4( $__fusion_2_id: ID! @@ -394,6 +396,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query GetUser_c03cccb0_1 { a: reviews { @@ -457,6 +460,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query GetUser_c03cccb0_3( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values.yaml index 207a869a51a..8acfcb0f4d6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values.yaml @@ -81,6 +81,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_595ce2b9_3( $__fusion_2_id: ID! @@ -156,6 +157,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_595ce2b9_1 { userBySlug(slug: "me") { @@ -173,6 +175,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_595ce2b9_4( $__fusion_3_id: ID! @@ -264,6 +267,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_595ce2b9_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values_And_Forwarded_Variable.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values_And_Forwarded_Variable.yaml index eafcbecf73c..446eba86ebb 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values_And_Forwarded_Variable.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values_And_Forwarded_Variable.yaml @@ -89,6 +89,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_b1ca18eb_3( $arg2: String @@ -168,6 +169,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b1ca18eb_1 { userBySlug(slug: "me") { @@ -185,6 +187,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_b1ca18eb_4( $arg1: String @@ -280,6 +283,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b1ca18eb_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values_Some_Items_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values_Some_Items_Null.yaml index 1df46d0586a..914988fd036 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values_Some_Items_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.BatchExecutionState_With_Multiple_Variable_Values_Some_Items_Null.yaml @@ -81,6 +81,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_595ce2b9_3( $__fusion_2_id: ID! @@ -156,6 +157,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_595ce2b9_1 { userBySlug(slug: "me") { @@ -173,6 +175,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_595ce2b9_4( $__fusion_3_id: ID! @@ -264,6 +267,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_595ce2b9_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field.yaml index effab74f01c..e44efb51926 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field.yaml @@ -50,6 +50,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query FetchNode_7eae38bd_3( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field_From_Two_Subgraphs.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field_From_Two_Subgraphs.yaml index 43d54f1f70e..b925b258e63 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field_From_Two_Subgraphs.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field_From_Two_Subgraphs.yaml @@ -64,6 +64,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query FetchNode_47e389d6_4( $__fusion_1_id: ID! @@ -126,6 +127,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query FetchNode_47e389d6_3( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field_Pass_In_Review_Id.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field_Pass_In_Review_Id.yaml index 1a331bfa27c..4b0c2078590 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field_Pass_In_Review_Id.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Fetch_User_With_Node_Field_Pass_In_Review_Id.yaml @@ -82,6 +82,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query FetchNode_7eae38bd_2( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node.yaml index 5a03c136345..9a1e644198a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node.yaml @@ -61,6 +61,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_8e568844_1( $productId: ID! @@ -118,6 +119,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_8e568844_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_2.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_2.yaml index f89bede1703..1d10e85f6fe 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_2.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_2.yaml @@ -65,6 +65,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_90079d4b_1( $productId: ID! @@ -124,6 +125,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_3.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_3.yaml index ab5ae72377f..59990b5b353 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_3.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Field_Below_Shared_Field_Only_Available_On_One_Subgraph_Type_Of_Shared_Field_Not_Node_3.yaml @@ -71,6 +71,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_b7bd95cc_1( $productId: ID! @@ -134,6 +135,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 kind: OperationBatch items: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Node_Variables.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Node_Variables.yaml index c1285843699..a464f3384a1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Node_Variables.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Node_Variables.yaml @@ -129,6 +129,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query ProductReviews_a31f6868_3( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Object_Variables.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Object_Variables.yaml index ba0f9595379..86cb8fab17f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Object_Variables.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Object_Variables.yaml @@ -135,6 +135,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query ProductReviews_4a9e0ed8_1( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables.yaml index c60cb70c222..6a2466bc53d 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables.yaml @@ -127,6 +127,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query ProductReviews_f7aec035_1( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables_No_OpName.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables_No_OpName.yaml index 487507bce6e..981c04edd41 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables_No_OpName.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables_No_OpName.yaml @@ -127,6 +127,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_4ffcfe3f_1( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables_No_OpName_Two_RootSelections.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables_No_OpName_Two_RootSelections.yaml index e953c089d13..99c03f6d16b 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables_No_OpName_Two_RootSelections.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Forward_Nested_Variables_No_OpName_Two_RootSelections.yaml @@ -135,6 +135,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_5090b8e6_1( $id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.GetFirstPage_With_After_Null.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.GetFirstPage_With_After_Null.yaml index d0db0a537d0..1264d1bd472 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.GetFirstPage_With_After_Null.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.GetFirstPage_With_After_Null.yaml @@ -53,6 +53,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query AfterNull_bcc834fd_1( $after: String diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.QueryType_Parallel_Multiple_SubGraphs_WithArguments.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.QueryType_Parallel_Multiple_SubGraphs_WithArguments.yaml index a9198a16015..6c6d2ddedcc 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.QueryType_Parallel_Multiple_SubGraphs_WithArguments.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.QueryType_Parallel_Multiple_SubGraphs_WithArguments.yaml @@ -136,6 +136,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query TopProducts_ca09eae1_3( $__fusion_2_id: ID! @@ -264,6 +265,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query TopProducts_ca09eae1_1 { topProducts(first: 5) { @@ -320,6 +322,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query TopProducts_ca09eae1_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context.yaml index 7a88328dfa6..b503c006a68 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context.yaml @@ -94,6 +94,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Requires_beac16b7_4( $__fusion_3_id: ID! @@ -187,6 +188,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Requires_beac16b7_1 { reviews { @@ -278,6 +280,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Requires_beac16b7_3( $__fusion_2_id: ID! @@ -353,6 +356,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Requires_beac16b7_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context_2.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context_2.yaml index 8188f271467..6533486b031 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context_2.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context_2.yaml @@ -90,6 +90,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Requires_b3dd796a_3( $__fusion_2_id: ID! @@ -183,6 +184,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Requires_b3dd796a_1 { reviews { @@ -300,6 +302,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Requires_b3dd796a_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context_3.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context_3.yaml index 83e0f646531..20a370d96ab 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context_3.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Require_Data_In_Context_3.yaml @@ -204,6 +204,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Large_62d57bc0_1 { users { @@ -237,6 +238,7 @@ sourceSchemas: } } - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Large_62d57bc0_5( $__fusion_4_id: ID! @@ -408,6 +410,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Large_62d57bc0_2( $__fusion_1_id: ID! @@ -596,6 +599,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Large_62d57bc0_4( $__fusion_3_id: ID! @@ -737,6 +741,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Large_62d57bc0_3( $__fusion_2_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Same_Selection_On_Two_List_Fields_That_Require_Data_From_Another_Subgraph.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Same_Selection_On_Two_List_Fields_That_Require_Data_From_Another_Subgraph.yaml index cfbb4993910..3cb993b75f2 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Same_Selection_On_Two_List_Fields_That_Require_Data_From_Another_Subgraph.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Same_Selection_On_Two_List_Fields_That_Require_Data_From_Another_Subgraph.yaml @@ -84,6 +84,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_9ad18dbf_1 { productsA { @@ -152,6 +153,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_9ad18dbf_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Same_Selection_On_Two_Object_Types_That_Require_Data_From_Another_Subgraph.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Same_Selection_On_Two_Object_Types_That_Require_Data_From_Another_Subgraph.yaml index 4394b758680..bb63cefa2e6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Same_Selection_On_Two_Object_Types_That_Require_Data_From_Another_Subgraph.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Same_Selection_On_Two_Object_Types_That_Require_Data_From_Another_Subgraph.yaml @@ -62,6 +62,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e2224f1b_1 { item1 { @@ -113,6 +114,7 @@ sourceSchemas: } interactions: - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 document: | query Op_e2224f1b_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Subgraph_Containing_More_Selections_Is_Chosen.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Subgraph_Containing_More_Selections_Is_Chosen.yaml index 7611a09b034..feeacbcfccf 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Subgraph_Containing_More_Selections_Is_Chosen.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Subgraph_Containing_More_Selections_Is_Chosen.yaml @@ -37,6 +37,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_40bd37df_1 { productBySlug { @@ -92,6 +93,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_40bd37df_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Two_Arguments_Differing_Nullability_Does_Not_Duplicate_Forwarded_Variables.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Two_Arguments_Differing_Nullability_Does_Not_Duplicate_Forwarded_Variables.yaml index 5c1d4134719..d3a52a89417 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Two_Arguments_Differing_Nullability_Does_Not_Duplicate_Forwarded_Variables.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Two_Arguments_Differing_Nullability_Does_Not_Duplicate_Forwarded_Variables.yaml @@ -44,6 +44,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Test_2ead4419_1( $number: Int! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Unresolvable_Subgraph_Is_Not_Chosen_If_Data_Is_Available_In_Resolvable_Subgraph.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Unresolvable_Subgraph_Is_Not_Chosen_If_Data_Is_Available_In_Resolvable_Subgraph.yaml index 8e06d41d9e6..d7bb128b5a2 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Unresolvable_Subgraph_Is_Not_Chosen_If_Data_Is_Available_In_Resolvable_Subgraph.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Unresolvable_Subgraph_Is_Not_Chosen_If_Data_Is_Available_In_Resolvable_Subgraph.yaml @@ -45,6 +45,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_ab5a0549_1 { viewer { @@ -103,6 +104,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_ab5a0549_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_1.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_1.yaml index 95455d3756c..39664ecdaa8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_1.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_1.yaml @@ -42,6 +42,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_65ad0daf_1 { exclusiveSubgraphA { @@ -73,6 +74,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_65ad0daf_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_2.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_2.yaml index f4984da3d70..341d02c24a6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_2.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_2.yaml @@ -50,6 +50,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_f3bb7334_1 { exclusiveSubgraphA { @@ -85,6 +86,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query testQuery_f3bb7334_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_3.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_3.yaml index bf2f985575f..8c4d3942f6d 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_3.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/DemoIntegrationTests.Viewer_Bug_3.yaml @@ -41,6 +41,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_dc7df637_2 { viewer { @@ -72,6 +73,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_dc7df637_3 { viewer { @@ -104,6 +106,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_dc7df637_1 { subgraphC { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_EntryField_NonNull_One_Service_Errors_EntryField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_EntryField_NonNull_One_Service_Errors_EntryField.yaml index 9c9c4adc67f..749d92ff903 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_EntryField_NonNull_One_Service_Errors_EntryField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_EntryField_NonNull_One_Service_Errors_EntryField.yaml @@ -38,6 +38,7 @@ sourceSchemas: isTimingOut: true interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_1 { viewer { @@ -59,6 +60,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_2 { other { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_EntryField_Nullable_One_Service_Errors_EntryField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_EntryField_Nullable_One_Service_Errors_EntryField.yaml index 6aaddf2b8ea..a9616f8e2bd 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_EntryField_Nullable_One_Service_Errors_EntryField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_EntryField_Nullable_One_Service_Errors_EntryField.yaml @@ -43,6 +43,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_1 { viewer { @@ -74,6 +75,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_2 { other { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_NonNull_EntryField_NonNull_One_Service_Errors_SubField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_NonNull_EntryField_NonNull_One_Service_Errors_SubField.yaml index 342302e8aea..9ce224aad7b 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_NonNull_EntryField_NonNull_One_Service_Errors_SubField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_NonNull_EntryField_NonNull_One_Service_Errors_SubField.yaml @@ -38,6 +38,7 @@ sourceSchemas: isTimingOut: true interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_1 { viewer { @@ -59,6 +60,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_2 { other { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_NonNull_EntryField_Nullable_One_Service_Errors_SubField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_NonNull_EntryField_Nullable_One_Service_Errors_SubField.yaml index 20e1778c917..901bd0a016a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_NonNull_EntryField_Nullable_One_Service_Errors_SubField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_NonNull_EntryField_Nullable_One_Service_Errors_SubField.yaml @@ -43,6 +43,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_1 { viewer { @@ -74,6 +75,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_2 { other { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_Nullable_EntryField_Nullable_One_Service_Errors_SubField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_Nullable_EntryField_Nullable_One_Service_Errors_SubField.yaml index 399c70b005b..a64008cae99 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_Nullable_EntryField_Nullable_One_Service_Errors_SubField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Parallel_SubField_Nullable_EntryField_Nullable_One_Service_Errors_SubField.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_1 { viewer { @@ -77,6 +78,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_2 { other { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_NonNull_One_Service_Errors_EntryField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_NonNull_One_Service_Errors_EntryField.yaml index aeae81b4a31..d2097884848 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_NonNull_One_Service_Errors_EntryField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_NonNull_One_Service_Errors_EntryField.yaml @@ -48,6 +48,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -86,6 +87,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_NonNull_One_Service_Errors_SubField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_NonNull_One_Service_Errors_SubField.yaml index d345eed4104..5da10dbf316 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_NonNull_One_Service_Errors_SubField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_NonNull_One_Service_Errors_SubField.yaml @@ -48,6 +48,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -86,6 +87,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_Nullable_One_Service_Errors_EntryField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_Nullable_One_Service_Errors_EntryField.yaml index 12373198038..054429176da 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_Nullable_One_Service_Errors_EntryField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_Nullable_One_Service_Errors_EntryField.yaml @@ -51,6 +51,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -89,6 +90,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_Nullable_One_Service_Errors_SubField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_Nullable_One_Service_Errors_SubField.yaml index 2db350cc616..c850b6eedce 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_Nullable_One_Service_Errors_SubField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_NonNull_Parent_Nullable_One_Service_Errors_SubField.yaml @@ -51,6 +51,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -89,6 +90,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_Nullable_Parent_Nullable_One_Service_Errors_EntryField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_Nullable_Parent_Nullable_One_Service_Errors_EntryField.yaml index 18d81cc6143..18b9de9d289 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_Nullable_Parent_Nullable_One_Service_Errors_EntryField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_Nullable_Parent_Nullable_One_Service_Errors_EntryField.yaml @@ -54,6 +54,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -92,6 +93,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_Nullable_Parent_Nullable_One_Service_Errors_SubField.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_Nullable_Parent_Nullable_One_Service_Errors_SubField.yaml index ddb82aff4c6..6609d8b8f32 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_Nullable_Parent_Nullable_One_Service_Errors_SubField.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/SubgraphErrorTests.Resolve_Sequence_SubField_Nullable_Parent_Nullable_One_Service_Errors_SubField.yaml @@ -54,6 +54,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -92,6 +93,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Node_Service_Offline_EntryField_Nullable.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Node_Service_Offline_EntryField_Nullable.yaml index 98e3ad2a703..28ca878e291 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Node_Service_Offline_EntryField_Nullable.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Node_Service_Offline_EntryField_Nullable.yaml @@ -45,6 +45,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_82e961c4_3 { node(id: "QnJhbmQ6MQ==") { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Both_Services_Offline_SharedEntryField_NonNull.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Both_Services_Offline_SharedEntryField_NonNull.yaml index d3ec7c195a4..d4895e675cb 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Both_Services_Offline_SharedEntryField_NonNull.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Both_Services_Offline_SharedEntryField_NonNull.yaml @@ -35,6 +35,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97b6c9a3_1 { viewer { @@ -58,6 +59,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_97b6c9a3_2 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_One_Service_Offline_EntryFields_NonNull.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_One_Service_Offline_EntryFields_NonNull.yaml index 193f1da7e8e..ed909e89e2f 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_One_Service_Offline_EntryFields_NonNull.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_One_Service_Offline_EntryFields_NonNull.yaml @@ -37,6 +37,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_1 { viewer { @@ -60,6 +61,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_2 { other { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_One_Service_Offline_EntryFields_Nullable.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_One_Service_Offline_EntryFields_Nullable.yaml index 3dc3f6bf7df..6e565dfe14a 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_One_Service_Offline_EntryFields_Nullable.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_One_Service_Offline_EntryFields_Nullable.yaml @@ -43,6 +43,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_1 { viewer { @@ -66,6 +67,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_6b55933b_2 { other { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Single_Service_Offline_EntryField_NonNull.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Single_Service_Offline_EntryField_NonNull.yaml index e6015a997d3..e7d6381a355 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Single_Service_Offline_EntryField_NonNull.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Single_Service_Offline_EntryField_NonNull.yaml @@ -34,6 +34,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_7a17934e_1 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Single_Service_Offline_EntryField_Nullable.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Single_Service_Offline_EntryField_Nullable.yaml index 8c35ef95865..71504813057 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Single_Service_Offline_EntryField_Nullable.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Parallel_Single_Service_Offline_EntryField_Nullable.yaml @@ -37,6 +37,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_7a17934e_1 { viewer { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_First_Service_Offline_EntryField_NonNull.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_First_Service_Offline_EntryField_NonNull.yaml index 4df7542a2f6..f5d1b489fd9 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_First_Service_Offline_EntryField_NonNull.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_First_Service_Offline_EntryField_NonNull.yaml @@ -43,6 +43,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_First_Service_Offline_EntryField_Nullable.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_First_Service_Offline_EntryField_Nullable.yaml index 275c270e003..1fd2327cae5 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_First_Service_Offline_EntryField_Nullable.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_First_Service_Offline_EntryField_Nullable.yaml @@ -46,6 +46,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_NonNull_Parent_NonNull.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_NonNull_Parent_NonNull.yaml index f91e82e2b0b..19fb93bcd94 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_NonNull_Parent_NonNull.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_NonNull_Parent_NonNull.yaml @@ -48,6 +48,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -86,6 +87,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_NonNull_Parent_Nullable.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_NonNull_Parent_Nullable.yaml index f5cd0ffe65f..d1aa562a903 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_NonNull_Parent_Nullable.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_NonNull_Parent_Nullable.yaml @@ -51,6 +51,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -89,6 +90,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_Nullable_Parent_Nullable.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_Nullable_Parent_Nullable.yaml index 31974f606f6..2893e45eea8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_Nullable_Parent_Nullable.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/v15/__snapshots__/TransportErrorTests.Resolve_Sequence_Second_Service_Offline_SubField_Nullable_Parent_Nullable.yaml @@ -54,6 +54,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_1 { product { @@ -92,6 +93,7 @@ sourceSchemas: } interactions: - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 document: | query Op_e358ecef_2( $__fusion_1_id: ID! diff --git a/src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj b/src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj index eb98d33767e..4a8c0718159 100644 --- a/src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj +++ b/src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj @@ -1,5 +1,6 @@ + net10.0 HotChocolate.Demo.Catalog.Tests HotChocolate.Demo.Catalog.Tests From ba748fa6d14f4ea3bf544655d3e80de09febef79 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:57:31 +0200 Subject: [PATCH 2/6] Reduce code duplication in branches --- .../Clients/SourceSchemaHttpClient.cs | 232 ++---------- .../FusionTestBase.CreateSourceSchema.cs | 8 +- .../Fusion.AspNetCore.Tests/FusionTestBase.cs | 15 + .../SourceSchemaClientCapabilitiesTests.cs | 324 +++++++++++----- ...ests.BatchRequest_OnlyRequestBatching.yaml | 229 +++++++++++ ...tching_NoRequestIndexInServerPayloads.yaml | 229 +++++++++++ ...ationBatchRequest_OnlyRequestBatching.yaml | 341 +++++++++++++++++ ...tching_NoRequestIndexInServerPayloads.yaml | 357 ++++++++++++++++++ ...erTests.Source_Schema_Transport_Error.snap | 2 +- 9 files changed, 1433 insertions(+), 304 deletions(-) create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching.yaml create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs index 7b8aab36e9c..a8c566add38 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs @@ -14,8 +14,6 @@ namespace HotChocolate.Fusion.Execution.Clients; -// TODO: I don't like that everything has branched paths for when callback is specified - /// /// HTTP-based implementation of that sends GraphQL operations /// to a downstream service over HTTP. Supports single requests, Apollo-style request batching, @@ -111,15 +109,14 @@ public IAsyncEnumerable ExecuteBatchStreamAsync( var httpRequest = CreateHttpBatchRequest(context, requests, requiresFileUpload, ref buffer); ConfigureCallbacks(httpRequest, context, requests[0].Node); + var results = ExecuteBatchStreamAsync(requests, httpRequest, cancellationToken); + return _configuration.OnSourceSchemaResult is null - ? ExecuteBatchStreamCoreAsync( - requests, - httpRequest, - cancellationToken) - : ExecuteBatchStreamWithCallbackAsync( + ? results + : WithBatchCallback( + results, context, requests, - httpRequest, _configuration.OnSourceSchemaResult, cancellationToken); } @@ -130,7 +127,7 @@ public IAsyncEnumerable ExecuteBatchStreamAsync( } } - private async IAsyncEnumerable ExecuteBatchStreamCoreAsync( + private async IAsyncEnumerable ExecuteBatchStreamAsync( ImmutableArray requests, GraphQLHttpRequest httpRequest, [EnumeratorCancellation] CancellationToken cancellationToken) @@ -209,96 +206,17 @@ private async IAsyncEnumerable ExecuteBatchStreamCoreAsync( } } - private async IAsyncEnumerable ExecuteBatchStreamWithCallbackAsync( + private static async IAsyncEnumerable WithBatchCallback( + IAsyncEnumerable results, OperationPlanContext context, ImmutableArray requests, - GraphQLHttpRequest httpRequest, Action onSourceSchemaResult, [EnumeratorCancellation] CancellationToken cancellationToken) { - var httpResponse = await _client.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); - - try + await foreach (var batchResult in results.WithCancellation(cancellationToken)) { - await foreach (var result in httpResponse.ReadAsResultStreamAsync().WithCancellation(cancellationToken)) - { - var requestIndex = ResolveRequestIndex(requests, result); - - if (requestIndex == -1) - { - for (var i = 0; i < requests.Length; i++) - { - var req = requests[i]; - - if (!TryGetResultPath(req, variableIndex: 0, out var p, out var ap)) - { - continue; - } - - var ssr = ap.IsDefaultOrEmpty - ? new SourceSchemaResult(p, result) - : new SourceSchemaResult(p, result, additionalPaths: ap); - - onSourceSchemaResult(context, req.Node, ssr); - yield return new BatchStreamResult(i, ssr); - } - - continue; - } - - var request = requests[requestIndex]; - var variableIndex = ResolveVariableIndex(request, result); - - if (variableIndex == -1) - { - for (var vi = 0; vi < request.Variables.Length; vi++) - { - if (!TryGetResultPath(request, vi, out var vp, out var vap)) - { - continue; - } - - var vssr = vap.IsDefaultOrEmpty - ? new SourceSchemaResult(vp, result) - : new SourceSchemaResult(vp, result, additionalPaths: vap); - - onSourceSchemaResult(context, request.Node, vssr); - yield return new BatchStreamResult(requestIndex, vssr); - } - - continue; - } - - if (!TryGetResultPath(request, variableIndex, out var path, out var additionalPaths)) - { - result.Dispose(); - throw new InvalidOperationException( - string.Format( - FusionExecutionResources.SourceSchemaHttpClient_InvalidVariableIndex, - variableIndex, - request.Node.Id)); - } - - var sourceSchemaResult = additionalPaths.IsDefaultOrEmpty - ? new SourceSchemaResult(path, result) - : new SourceSchemaResult(path, result, additionalPaths: additionalPaths); - - onSourceSchemaResult(context, request.Node, sourceSchemaResult); - - if (!additionalPaths.IsDefaultOrEmpty) - { - foreach (var additionalPath in additionalPaths) - { - onSourceSchemaResult(context, request.Node, sourceSchemaResult.WithPath(additionalPath)); - } - } - - yield return new BatchStreamResult(requestIndex, sourceSchemaResult); - } - } - finally - { - httpResponse.Dispose(); + onSourceSchemaResult(context, requests[batchResult.RequestIndex].Node, batchResult.Result); + yield return batchResult; } } @@ -739,9 +657,18 @@ private sealed class Response( public override IAsyncEnumerable ReadAsResultStreamAsync( CancellationToken cancellationToken = default) - => configuration.OnSourceSchemaResult is null - ? ReadAsResultStreamCoreAsync(cancellationToken) - : ReadAsResultStreamWithCallbackAsync(configuration.OnSourceSchemaResult, cancellationToken); + { + var results = ReadAsResultStreamCoreAsync(cancellationToken); + + return configuration.OnSourceSchemaResult is null + ? results + : WithResultCallback( + results, + context, + node, + configuration.OnSourceSchemaResult, + cancellationToken); + } private async IAsyncEnumerable ReadAsResultStreamCoreAsync( [EnumeratorCancellation] CancellationToken cancellationToken = default) @@ -842,114 +769,17 @@ private async IAsyncEnumerable ReadAsResultStreamCoreAsync( } } - private async IAsyncEnumerable ReadAsResultStreamWithCallbackAsync( + private static async IAsyncEnumerable WithResultCallback( + IAsyncEnumerable results, + OperationPlanContext context, + ExecutionNode node, Action onSourceSchemaResult, - [EnumeratorCancellation] CancellationToken cancellationToken = default) + [EnumeratorCancellation] CancellationToken cancellationToken) { - if (operation is OperationType.Subscription) + await foreach (var sourceSchemaResult in results.WithCancellation(cancellationToken)) { - await foreach (var result in response.ReadAsResultStreamAsync().WithCancellation(cancellationToken)) - { - var sourceSchemaResult = new SourceSchemaResult(CompactPath.Root, result); - onSourceSchemaResult(context, node, sourceSchemaResult); - yield return sourceSchemaResult; - } - } - else - { - switch (variables.Length) - { - case 0: - { - var result = await response.ReadAsResultAsync(cancellationToken); - var sourceSchemaResult = new SourceSchemaResult(CompactPath.Root, result); - onSourceSchemaResult(context, node, sourceSchemaResult); - yield return sourceSchemaResult; - break; - } - - case 1: - { - var result = await response.ReadAsResultAsync(cancellationToken); - var variable = variables[0]; - var sourceSchemaResult = new SourceSchemaResult( - variable.Path, result, additionalPaths: variable.AdditionalPaths); - onSourceSchemaResult(context, node, sourceSchemaResult); - yield return sourceSchemaResult; - break; - } - - default: - { - SourceSchemaResult? errorResult = null; - - if (configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching)) - { - await foreach (var result in response.ReadAsResultStreamAsync() - .WithCancellation(cancellationToken)) - { - if (!result.Root.TryGetProperty(VariableIndex, out var variableIndex) - || variableIndex.ValueKind is not JsonValueKind.Number) - { - errorResult = new SourceSchemaResult(variables[0].Path, result); - onSourceSchemaResult(context, node, errorResult); - break; - } - - var index = variableIndex.GetInt32(); - - if ((uint)index >= (uint)variables.Length) - { - errorResult = new SourceSchemaResult(variables[0].Path, result); - onSourceSchemaResult(context, node, errorResult); - break; - } - - var variable = variables[index]; - var sourceSchemaResult = new SourceSchemaResult( - variable.Path, result, additionalPaths: variable.AdditionalPaths); - onSourceSchemaResult(context, node, sourceSchemaResult); - yield return sourceSchemaResult; - } - } - else - { - var requestIndex = 0; - await foreach (var result in response.ReadAsResultStreamAsync() - .WithCancellation(cancellationToken)) - { - if ((uint)requestIndex >= (uint)variables.Length) - { - errorResult = new SourceSchemaResult(variables[0].Path, result); - onSourceSchemaResult(context, node, errorResult); - break; - } - - var variable = variables[requestIndex]; - var sourceSchemaResult = new SourceSchemaResult( - variable.Path, result, additionalPaths: variable.AdditionalPaths); - onSourceSchemaResult(context, node, sourceSchemaResult); - yield return sourceSchemaResult; - - requestIndex++; - } - } - - if (errorResult is not null) - { - for (var i = 0; i < variables.Length; i++) - { - var variable = variables[i]; - var error = errorResult.WithPath( - variable.Path, variable.AdditionalPaths); - onSourceSchemaResult(context, node, error); - yield return error; - } - } - - break; - } - } + onSourceSchemaResult(context, node, sourceSchemaResult); + yield return sourceSchemaResult; } } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs index 79ac3e2843c..727b57f9e46 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs @@ -25,7 +25,8 @@ protected TestServer CreateSourceSchema( SourceSchemaClientCapabilities? capabilities = null, ImmutableArray? defaultAcceptHeaderValues = null, ImmutableArray? batchingAcceptHeaderValues = null, - ImmutableArray? subscriptionAcceptHeaderValues = null) + ImmutableArray? subscriptionAcceptHeaderValues = null, + Func? mockHttpResponse = null) { configureApplication ??= app => @@ -51,6 +52,7 @@ protected TestServer CreateSourceSchema( opt.IsOffline = isOffline; opt.IsTimingOut = isTimingOut; opt.ConfigureHttpClient = configureHttpClient; + opt.MockHttpResponse = mockHttpResponse; opt.Capabilities = capabilities; opt.DefaultAcceptHeaderValues = defaultAcceptHeaderValues; opt.BatchingAcceptHeaderValues = batchingAcceptHeaderValues; @@ -70,7 +72,8 @@ protected TestServer CreateSourceSchema( SourceSchemaClientCapabilities? capabilities = null, ImmutableArray? defaultAcceptHeaderValues = null, ImmutableArray? batchingAcceptHeaderValues = null, - ImmutableArray? subscriptionAcceptHeaderValues = null) + ImmutableArray? subscriptionAcceptHeaderValues = null, + Func? mockHttpResponse = null) { return _testServerSession.CreateServer(services => { @@ -91,6 +94,7 @@ protected TestServer CreateSourceSchema( opt.IsTimingOut = isTimingOut; opt.ConfigureHttpClient = configureHttpClient; opt.HttpClient = httpClient; + opt.MockHttpResponse = mockHttpResponse; opt.Capabilities = capabilities; opt.DefaultAcceptHeaderValues = defaultAcceptHeaderValues; opt.BatchingAcceptHeaderValues = batchingAcceptHeaderValues; diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs index 5f140a3206e..551e1c22844 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs @@ -286,6 +286,8 @@ private sealed class SourceSchemaOptions public HttpClient? HttpClient { get; set; } + public Func? MockHttpResponse { get; set; } + public SourceSchemaClientCapabilities? Capabilities { get; set; } public ImmutableArray? DefaultAcceptHeaderValues { get; set; } @@ -331,6 +333,10 @@ public HttpClient CreateClient(string name) { client = new HttpClient(new TimeoutHandler()); } + else if (registration.Options.MockHttpResponse is { } mockHandler) + { + client = new HttpClient(new MockResponseHandler(mockHandler)); + } else if (registration.Options.HttpClient is { } httpClient) { return httpClient; @@ -370,6 +376,15 @@ protected override async Task SendAsync( return new HttpResponseMessage(HttpStatusCode.OK); } } + + private class MockResponseHandler( + Func handler) : HttpMessageHandler + { + protected override Task SendAsync( + HttpRequestMessage request, + CancellationToken cancellationToken) + => Task.FromResult(handler(request)); + } } private record TestServerRegistration( diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs index 3ebe0c6bb09..91053367f25 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs @@ -1,5 +1,6 @@ using System.Net; using System.Text; +using HotChocolate.Fusion.Execution.Clients; using HotChocolate.Transport; using HotChocolate.Transport.Http; using HotChocolate.Types.Composite; @@ -8,10 +9,11 @@ namespace HotChocolate.Fusion; +// TODO: OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads this does still do variable batching public class SourceSchemaClientCapabilitiesTests : FusionTestBase { [Fact] - public async Task Test() + public async Task BatchRequest_OnlyRequestBatching() { // arrange using var server1 = CreateSourceSchema( @@ -20,17 +22,53 @@ public async Task Test() using var server2 = CreateSourceSchema( "b", - b => b.AddQueryType()); + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.RequestBatching); using var gateway = await CreateCompositeSchemaAsync( [ ("a", server1), ("b", server2) - ], - gatewaySettings: - """ + ]); - """); + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + rating + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + [Fact] + public async Task OperationBatchRequest_OnlyRequestBatching() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.RequestBatching); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); // act using var client = GraphQLHttpClient.Create(gateway.CreateClient()); @@ -39,9 +77,159 @@ public async Task Test() """ { books { - author { - id - name + a: author { + a: name + } + b: author { + b: name + } + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + // This tests the response of HotChocolate < 15 servers + [Fact] + public async Task BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.RequestBatching, + mockHttpResponse: request => + { + // TODO: Assert incoming request. mockHttpResponse should be async + var accept = request.Headers.Accept.ToString(); + if (!accept.Contains("text/event-stream")) + { + throw new InvalidOperationException(""); + } + + return new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent( + """ + event: next + data: {"data":{"bookById":{"rating":"1"}}} + + event: next + data: {"data":{"bookById":{"rating":"2"}}} + + event: next + data: {"data":{"bookById":{"rating":"3"}}} + + event: next + data: {"data":{"bookById":{"rating":"4"}}} + + event: complete + """, + Encoding.UTF8, + "text/event-stream") + }; + }); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + rating + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + // This tests the response of HotChocolate < 15 servers + [Fact] + public async Task OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.RequestBatching, + mockHttpResponse: request => + { + // TODO: Assert incoming request. mockHttpResponse should be async + var accept = request.Headers.Accept.ToString(); + if (!accept.Contains("text/event-stream")) + { + throw new InvalidOperationException(""); + } + + // TODO: How to properly do this + return new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent( + """ + event: next + data: {"data":{"bookById":{"rating":"1"}}} + + event: next + data: {"data":{"bookById":{"rating":"2"}}} + + event: next + data: {"data":{"bookById":{"rating":"3"}}} + + event: next + data: {"data":{"bookById":{"rating":"4"}}} + + event: complete + """, + Encoding.UTF8, + "text/event-stream") + }; + }); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + a: author { + a: name + } + b: author { + b: name } } } @@ -552,96 +740,35 @@ private static string GenerateRandomString(int kiloBytes) return stringBuilder.ToString(); } - private sealed class MockHttpMessageHandler(string responseContent) : HttpMessageHandler - { - protected override Task SendAsync( - HttpRequestMessage request, - CancellationToken cancellationToken) - { - var response = new HttpResponseMessage(HttpStatusCode.OK) - { - Content = new StringContent(responseContent, Encoding.UTF8, "application/json") - }; - return Task.FromResult(response); - } - } - - public static class NestedLookups - { - public static class SourceSchema1 - { - public record Book([property: ID] int Id, string Title, [property: Shareable] Author Author); - - [EntityKey("id")] - public record Author([property: ID] int Id); - - public class Query - { - private readonly OrderedDictionary _books = - new() - { - [1] = new Book(1, "C# in Depth", new Author(1)), - [2] = new Book(2, "The Lord of the Rings", new Author(2)), - [3] = new Book(3, "The Hobbit", new Author(2)), - [4] = new Book(4, "The Silmarillion", new Author(2)) - }; - - public IEnumerable GetBooks() - => _books.Values; - } - } - - public static class SourceSchema2 - { - public record Author([property: ID] int Id, string Name); - - public class Query - { - [Internal] public InternalLookups Lookups { get; } = new(); - } - - [Internal] - public class InternalLookups - { - private readonly OrderedDictionary _authors = new() - { - [1] = new Author(1, "Jon Skeet"), [2] = new Author(2, "JRR Tolkien") - }; - - [Lookup] - public Author GetAuthorById([ID] int id) - => _authors[id]; - } - - public record Book([property: ID] int Id, [property: Shareable] Author Author) - { - public string IdAndTitle([Require] string title) - => $"{Id} - {title}"; - } - } - } - public static class SourceSchema1 { - public record Book([property: ID] int Id, string Title, [property: Shareable] Author Author); - - [EntityKey("id")] - public record Author([property: ID] int Id); - public class Query { private readonly OrderedDictionary _books = new() { - [1] = new Book(1, "C# in Depth", new Author(1)), - [2] = new Book(2, "The Lord of the Rings", new Author(2)), - [3] = new Book(3, "The Hobbit", new Author(2)), - [4] = new Book(4, "The Silmarillion", new Author(2)) + [1] = new Book(1, "C# in Depth"), + [2] = new Book(2, "The Lord of the Rings"), + [3] = new Book(3, "The Hobbit"), + [4] = new Book(4, "The Silmarillion") }; public IEnumerable GetBooks() => _books.Values; + + [Lookup, Internal] + public Book? GetBookById([ID] int id) => _books.GetValueOrDefault(id); + + [Lookup, Internal] + public Author? GetAuthorById([ID] int id) => null; } + + public record Book([property: ID] int Id, string Title) + { + public Author? GetAuthor() => new Author(Id); + }; + + public record Author([property: ID] int Id); } public static class SourceSchema2 @@ -649,23 +776,20 @@ public static class SourceSchema2 public class Query { [Lookup, Internal] - public Author? GetAuthorById([ID] int id) - => new(id); + public Book? GetBookById([ID] int id) => new(id); + + [Lookup, Internal] + public Author? GetAuthorById([ID] int id) => new(id); } - public record Author([property: ID] int Id) + public record Book([property: ID] int Id) { - public string GetName(bool large = false) - { - var name = "Author " + Id; - - if (large) - { - return name + " " + GenerateRandomString(128); - } + public string GetRating() => Id.ToString(); + } - return name; - } + public record Author([property: ID] int Id) + { + public string GetName() => "Author " + Id; } } } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml new file mode 100644 index 00000000000..ad33efee173 --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml @@ -0,0 +1,229 @@ +title: BatchRequest_OnlyRequestBatching +request: + document: | + { + books { + rating + } + } +response: + body: | + { + "data": { + "books": [ + { + "rating": "1" + }, + { + "rating": "2" + }, + { + "rating": "3" + }, + { + "rating": "4" + } + ] + } + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_490e9345_1 { + books { + id + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "id": "1" + }, + { + "id": "2" + }, + { + "id": "3" + }, + { + "id": "4" + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name: String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "1" + } + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "2" + } + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "3" + } + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "4" + } + response: + contentType: application/jsonl; charset=utf-8 + results: + - | + { + "data": { + "bookById": { + "rating": "1" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "2" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "3" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "4" + } + } + } +operationPlan: + operation: + - document: | + { + books { + rating + id @fusion__requirement + } + } + hash: 490e934563f9d79a50edbb76c6b9b5cc + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_490e9345_1 { + books { + id + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + source: $.bookById + target: $.books + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml new file mode 100644 index 00000000000..f7898074c3d --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml @@ -0,0 +1,229 @@ +title: BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads +request: + document: | + { + books { + rating + } + } +response: + body: | + { + "data": { + "books": [ + { + "rating": "1" + }, + { + "rating": "2" + }, + { + "rating": "3" + }, + { + "rating": "4" + } + ] + } + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_490e9345_1 { + books { + id + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "id": "1" + }, + { + "id": "2" + }, + { + "id": "3" + }, + { + "id": "4" + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name: String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "1" + } + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "2" + } + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "3" + } + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "4" + } + response: + contentType: text/event-stream; charset=utf-8 + results: + - | + { + "data": { + "bookById": { + "rating": "1" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "2" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "3" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "4" + } + } + } +operationPlan: + operation: + - document: | + { + books { + rating + id @fusion__requirement + } + } + hash: 490e934563f9d79a50edbb76c6b9b5cc + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_490e9345_1 { + books { + id + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + source: $.bookById + target: $.books + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching.yaml new file mode 100644 index 00000000000..a7fe7cfc648 --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching.yaml @@ -0,0 +1,341 @@ +title: OperationBatchRequest_OnlyRequestBatching +request: + document: | + { + books { + a: author { + a: name + } + b: author { + b: name + } + } + } +response: + body: | + { + "data": { + "books": [ + { + "a": { + "a": "Author 1" + }, + "b": { + "b": "Author 1" + } + }, + { + "a": { + "a": "Author 2" + }, + "b": { + "b": "Author 2" + } + }, + { + "a": { + "a": "Author 3" + }, + "b": { + "b": "Author 3" + } + }, + { + "a": { + "a": "Author 4" + }, + "b": { + "b": "Author 4" + } + } + ] + } + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_438caae6_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "a": { + "id": "1" + }, + "b": { + "id": "1" + } + }, + { + "a": { + "id": "2" + }, + "b": { + "id": "2" + } + }, + { + "a": { + "id": "3" + }, + "b": { + "id": "3" + } + }, + { + "a": { + "id": "4" + }, + "b": { + "id": "4" + } + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name: String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_438caae6_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name + } + } + variables: | + [ + { + "__fusion_1_id": "1" + }, + { + "__fusion_1_id": "2" + }, + { + "__fusion_1_id": "3" + }, + { + "__fusion_1_id": "4" + } + ] + - document: | + query Op_438caae6_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + [ + { + "__fusion_2_id": "1" + }, + { + "__fusion_2_id": "2" + }, + { + "__fusion_2_id": "3" + }, + { + "__fusion_2_id": "4" + } + ] + response: + contentType: application/jsonl; charset=utf-8 + results: + - | + { + "data": { + "authorById": { + "a": "Author 3" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 4" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 1" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 3" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 4" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 1" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 2" + } + } + } +operationPlan: + operation: + - document: | + { + books { + a: author { + a: name + id @fusion__requirement + } + b: author { + b: name + id @fusion__requirement + } + } + } + hash: 438caae6f2bc97e0e430725aaac93641 + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_438caae6_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_438caae6_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name + } + } + source: $.authorById + target: $.books.b + batchingGroupId: 2 + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 + - id: 3 + type: Operation + schema: b + operation: | + query Op_438caae6_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + source: $.authorById + target: $.books.a + batchingGroupId: 2 + requirements: + - name: __fusion_2_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml new file mode 100644 index 00000000000..989be259d7f --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml @@ -0,0 +1,357 @@ +title: OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads +request: + document: | + { + books { + a: author { + a: name + } + b: author { + b: name + } + } + } +response: + body: | + { + "data": { + "books": [ + { + "a": null, + "b": null + }, + { + "a": { + "a": null + }, + "b": { + "b": null + } + }, + { + "a": { + "a": null + }, + "b": { + "b": null + } + }, + { + "a": { + "a": null + }, + "b": { + "b": null + } + } + ] + }, + "errors": [ + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "b", + "b" + ] + } + ] + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_438caae6_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "a": { + "id": "1" + }, + "b": { + "id": "1" + } + }, + { + "a": { + "id": "2" + }, + "b": { + "id": "2" + } + }, + { + "a": { + "id": "3" + }, + "b": { + "id": "3" + } + }, + { + "a": { + "id": "4" + }, + "b": { + "id": "4" + } + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name: String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_438caae6_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name + } + } + variables: | + [ + { + "__fusion_1_id": "1" + }, + { + "__fusion_1_id": "2" + }, + { + "__fusion_1_id": "3" + }, + { + "__fusion_1_id": "4" + } + ] + - document: | + query Op_438caae6_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + [ + { + "__fusion_2_id": "1" + }, + { + "__fusion_2_id": "2" + }, + { + "__fusion_2_id": "3" + }, + { + "__fusion_2_id": "4" + } + ] + response: + contentType: text/event-stream; charset=utf-8 + results: + - | + { + "data": { + "bookById": { + "rating": "1" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "1" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "2" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "2" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "3" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "3" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "4" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "4" + } + } + } +operationPlan: + operation: + - document: | + { + books { + a: author { + a: name + id @fusion__requirement + } + b: author { + b: name + id @fusion__requirement + } + } + } + hash: 438caae6f2bc97e0e430725aaac93641 + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_438caae6_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_438caae6_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name + } + } + source: $.authorById + target: $.books.b + batchingGroupId: 2 + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 + - id: 3 + type: Operation + schema: b + operation: | + query Op_438caae6_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + source: $.authorById + target: $.books.a + batchingGroupId: 2 + requirements: + - name: __fusion_2_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/__snapshots__/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap b/src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/__snapshots__/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap index a21a17989a1..26a84ad5d80 100644 --- a/src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/__snapshots__/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap +++ b/src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/__snapshots__/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap @@ -157,7 +157,7 @@ }, { "Key": "exception.stacktrace", - "Value": "System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).\n at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()\n at HotChocolate.Fusion.Transport.Http.GraphQLHttpResponse.ReadAsResultAsync(CancellationToken cancellationToken) in GraphQLHttpResponse.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.ReadAsResultStreamWithCallbackAsync(Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.ReadAsResultStreamWithCallbackAsync(Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()\n at HotChocolate.Fusion.Execution.Nodes.OperationExecutionNode.OnExecuteAsync(OperationPlanContext context, CancellationToken cancellationToken) in OperationExecutionNode.cs\n at HotChocolate.Fusion.Execution.Nodes.OperationExecutionNode.OnExecuteAsync(OperationPlanContext context, CancellationToken cancellationToken) in OperationExecutionNode.cs" + "Value": "System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).\n at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()\n at HotChocolate.Fusion.Transport.Http.GraphQLHttpResponse.ReadAsResultAsync(CancellationToken cancellationToken) in GraphQLHttpResponse.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.ReadAsResultStreamCoreAsync(CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.ReadAsResultStreamCoreAsync(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+MoveNext() in SourceSchemaHttpClient.cs\n at HotChocolate.Fusion.Execution.Clients.SourceSchemaHttpClient.Response.WithResultCallback(IAsyncEnumerable`1 results, OperationPlanContext context, ExecutionNode node, Action`3 onSourceSchemaResult, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()\n at HotChocolate.Fusion.Execution.Nodes.OperationExecutionNode.OnExecuteAsync(OperationPlanContext context, CancellationToken cancellationToken) in OperationExecutionNode.cs\n at HotChocolate.Fusion.Execution.Nodes.OperationExecutionNode.OnExecuteAsync(OperationPlanContext context, CancellationToken cancellationToken) in OperationExecutionNode.cs" }, { "Key": "exception.type", From 45c7106fb59eaa75b26e7788b2fef70307129248 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:15:08 +0200 Subject: [PATCH 3/6] wip --- .../Clients/SourceSchemaHttpClient.cs | 47 +-- .../FusionTestBase.CreateSourceSchema.cs | 4 +- .../Fusion.AspNetCore.Tests/FusionTestBase.cs | 6 +- .../SourceSchemaClientCapabilitiesTests.cs | 352 ++++++++++++++--- ...iNode_BatchRequest_CustomAcceptHeader.yaml | 221 +++++++++++ ...Node_BatchRequest_OnlyRequestBatching.yaml | 221 +++++++++++ ...tching_NoRequestIndexInServerPayloads.yaml | 221 +++++++++++ ...ode_BatchRequest_OnlyVariableBatching.yaml | 221 +++++++++++ ...ationBatchRequest_OnlyRequestBatching.yaml | 341 ----------------- ...tching_NoRequestIndexInServerPayloads.yaml | 357 ------------------ ...eNode_BatchRequest_CustomAcceptHeader.yaml | 168 +++++++++ ...ode_BatchRequest_OnlyRequestBatching.yaml} | 56 +-- ...ching_NoRequestIndexInServerPayloads.yaml} | 56 +-- ...ode_BatchRequest_OnlyVariableBatching.yaml | 168 +++++++++ ...SingleNode_Request_CustomAcceptHeader.yaml | 90 +++++ 15 files changed, 1639 insertions(+), 890 deletions(-) create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml delete mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching.yaml delete mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_CustomAcceptHeader.yaml rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml => SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching.yaml} (73%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml => SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml} (73%) create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyVariableBatching.yaml create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_Request_CustomAcceptHeader.yaml diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs index a8c566add38..93284343cdb 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs @@ -351,19 +351,36 @@ private GraphQLHttpRequest CreateHttpBatchRequest( } else { - var batchRequests = ImmutableArray.CreateBuilder(originalRequests.Length); + var batchRequests = ImmutableArray.CreateBuilder(); foreach (var sourceRequest in originalRequests) { - var body = CreateRequestBody(context, sourceRequest, ref buffer); - if (body is IOperationRequest operationRequest) - { - batchRequests.Add(operationRequest); - } - else + switch (sourceRequest.Variables.Length) { - throw new InvalidOperationException( - $"The request body type '{body.GetType().Name}' cannot be included in an operation batch."); + case 0 or 1: + batchRequests.Add(CreateSingleRequest(context, sourceRequest, ref buffer)); + break; + + default: + if (_configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching)) + { + batchRequests.Add(CreateVariableBatchRequest( + sourceRequest.OperationSourceText, sourceRequest)); + } + else + { + for (var j = 0; j < sourceRequest.Variables.Length; j++) + { + batchRequests.Add(new OperationRequest( + sourceRequest.OperationSourceText, + id: null, + operationName: null, + onError: null, + variables: sourceRequest.Variables[j], + extensions: JsonSegment.Empty)); + } + } + break; } } @@ -376,18 +393,6 @@ private GraphQLHttpRequest CreateHttpBatchRequest( } } - private static IRequestBody CreateRequestBody( - OperationPlanContext context, - SourceSchemaClientRequest originalRequest, - ref ChunkedArrayWriter? writer) - { - return originalRequest.Variables.Length switch - { - 0 or 1 => CreateSingleRequest(context, originalRequest, ref writer), - _ => CreateVariableBatchRequest(originalRequest.OperationSourceText, originalRequest) - }; - } - private static OperationRequest CreateSingleRequest( OperationPlanContext context, SourceSchemaClientRequest originalRequest, diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs index 727b57f9e46..3f840cabaae 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.CreateSourceSchema.cs @@ -26,7 +26,7 @@ protected TestServer CreateSourceSchema( ImmutableArray? defaultAcceptHeaderValues = null, ImmutableArray? batchingAcceptHeaderValues = null, ImmutableArray? subscriptionAcceptHeaderValues = null, - Func? mockHttpResponse = null) + Func>? mockHttpResponse = null) { configureApplication ??= app => @@ -73,7 +73,7 @@ protected TestServer CreateSourceSchema( ImmutableArray? defaultAcceptHeaderValues = null, ImmutableArray? batchingAcceptHeaderValues = null, ImmutableArray? subscriptionAcceptHeaderValues = null, - Func? mockHttpResponse = null) + Func>? mockHttpResponse = null) { return _testServerSession.CreateServer(services => { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs index 551e1c22844..cc98fc735ab 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.cs @@ -286,7 +286,7 @@ private sealed class SourceSchemaOptions public HttpClient? HttpClient { get; set; } - public Func? MockHttpResponse { get; set; } + public Func>? MockHttpResponse { get; set; } public SourceSchemaClientCapabilities? Capabilities { get; set; } @@ -378,12 +378,12 @@ protected override async Task SendAsync( } private class MockResponseHandler( - Func handler) : HttpMessageHandler + Func> handler) : HttpMessageHandler { protected override Task SendAsync( HttpRequestMessage request, CancellationToken cancellationToken) - => Task.FromResult(handler(request)); + => handler(request); } } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs index 91053367f25..854b9493d3d 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs @@ -1,4 +1,5 @@ using System.Net; +using System.Net.Http.Headers; using System.Text; using HotChocolate.Fusion.Execution.Clients; using HotChocolate.Transport; @@ -9,11 +10,51 @@ namespace HotChocolate.Fusion; -// TODO: OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads this does still do variable batching +// TODO: MultiNode_BatchRequest_OnlyRequestBatching_* is failing, since the reading in SourceSchemaHttpClient is wrong. public class SourceSchemaClientCapabilitiesTests : FusionTestBase { + #region Single Node Request + + [Fact] + public async Task SingleNode_Request_CustomAcceptHeader() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType(), + defaultAcceptHeaderValues: [new MediaTypeWithQualityHeaderValue("application/json")]); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + title + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + #endregion + + #region Single Node Batch Request + [Fact] - public async Task BatchRequest_OnlyRequestBatching() + public async Task SingleNode_BatchRequest_CustomAcceptHeader() { // arrange using var server1 = CreateSourceSchema( @@ -23,13 +64,52 @@ public async Task BatchRequest_OnlyRequestBatching() using var server2 = CreateSourceSchema( "b", b => b.AddQueryType(), - capabilities: SourceSchemaClientCapabilities.RequestBatching); + batchingAcceptHeaderValues: [new MediaTypeWithQualityHeaderValue("application/jsonl")]); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + rating + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + [Fact] + public async Task SingleNode_BatchRequest_OnlyVariableBatching() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.VariableBatching); using var gateway = await CreateCompositeSchemaAsync( - [ - ("a", server1), - ("b", server2) - ]); + [ + ("a", server1), + ("b", server2) + ]); // act using var client = GraphQLHttpClient.Create(gateway.CreateClient()); @@ -52,7 +132,7 @@ public async Task BatchRequest_OnlyRequestBatching() } [Fact] - public async Task OperationBatchRequest_OnlyRequestBatching() + public async Task SingleNode_BatchRequest_OnlyRequestBatching() { // arrange using var server1 = CreateSourceSchema( @@ -77,12 +157,7 @@ public async Task OperationBatchRequest_OnlyRequestBatching() """ { books { - a: author { - a: name - } - b: author { - b: name - } + rating } } """); @@ -97,7 +172,7 @@ public async Task OperationBatchRequest_OnlyRequestBatching() // This tests the response of HotChocolate < 15 servers [Fact] - public async Task BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads() + public async Task SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads() { // arrange using var server1 = CreateSourceSchema( @@ -108,16 +183,9 @@ public async Task BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayload "b", b => b.AddQueryType(), capabilities: SourceSchemaClientCapabilities.RequestBatching, - mockHttpResponse: request => + mockHttpResponse: async request => { - // TODO: Assert incoming request. mockHttpResponse should be async - var accept = request.Headers.Accept.ToString(); - if (!accept.Contains("text/event-stream")) - { - throw new InvalidOperationException(""); - } - - return new HttpResponseMessage(HttpStatusCode.OK) + var response = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent( """ @@ -127,17 +195,20 @@ public async Task BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayload event: next data: {"data":{"bookById":{"rating":"2"}}} - event: next - data: {"data":{"bookById":{"rating":"3"}}} - - event: next - data: {"data":{"bookById":{"rating":"4"}}} - event: complete """, Encoding.UTF8, "text/event-stream") }; + + return await ReturnHttpResponse( + request, + "application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8", + """ + [{"query":"query Op_490e9345_2(\n $__fusion_1_id: ID!\n) {\n bookById(id: $__fusion_1_id) {\n rating\n }\n}","variables":{"__fusion_1_id":"1"}},{"query":"query Op_490e9345_2(\n $__fusion_1_id: ID!\n) {\n bookById(id: $__fusion_1_id) {\n rating\n }\n}","variables":{"__fusion_1_id":"2"}}] + """, + response + ); }); using var gateway = await CreateCompositeSchemaAsync( @@ -166,9 +237,12 @@ public async Task BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayload await MatchSnapshotAsync(gateway, request, result); } - // This tests the response of HotChocolate < 15 servers + #endregion + + #region Multi Node Batch + [Fact] - public async Task OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads() + public async Task MultiNode_BatchRequest_CustomAcceptHeader() { // arrange using var server1 = CreateSourceSchema( @@ -178,38 +252,165 @@ public async Task OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServ using var server2 = CreateSourceSchema( "b", b => b.AddQueryType(), - capabilities: SourceSchemaClientCapabilities.RequestBatching, - mockHttpResponse: request => + batchingAcceptHeaderValues: [new MediaTypeWithQualityHeaderValue("application/jsonl")]); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ { - // TODO: Assert incoming request. mockHttpResponse should be async - var accept = request.Headers.Accept.ToString(); - if (!accept.Contains("text/event-stream")) - { - throw new InvalidOperationException(""); + books { + a: author { + a: name } + b: author { + b: name(postFix: "2") + } + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); - // TODO: How to properly do this - return new HttpResponseMessage(HttpStatusCode.OK) + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + [Fact] + public async Task MultiNode_BatchRequest_OnlyVariableBatching() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.VariableBatching); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + a: author { + a: name + } + b: author { + b: name(postFix: "2") + } + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + [Fact] + public async Task MultiNode_BatchRequest_OnlyRequestBatching() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.RequestBatching); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + a: author { + a: name + } + b: author { + b: name(postFix: "2") + } + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + // This tests the response of HotChocolate < 15 servers + [Fact] + public async Task MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.RequestBatching, + mockHttpResponse: async request => + { + var response = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent( """ event: next - data: {"data":{"bookById":{"rating":"1"}}} - - event: next - data: {"data":{"bookById":{"rating":"2"}}} + data: {"data":{"authorById":{"b":"Author 1 - 2"}}} event: next - data: {"data":{"bookById":{"rating":"3"}}} - - event: next - data: {"data":{"bookById":{"rating":"4"}}} + data: {"data":{"authorById":{"b":"Author 1 - 2"}}} event: complete """, Encoding.UTF8, "text/event-stream") }; + + return await ReturnHttpResponse( + request, + "application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8", + """ + [{"query":"query Op_1b3419da_2(\n $__fusion_1_id: ID!\n) {\n authorById(id: $__fusion_1_id) {\n b: name(postFix: \"2\")\n }\n}","variables":[{"__fusion_1_id":"1"},{"__fusion_1_id":"2"},{"__fusion_1_id":"3"},{"__fusion_1_id":"4"}]},{"query":"query Op_1b3419da_3(\n $__fusion_2_id: ID!\n) {\n authorById(id: $__fusion_2_id) {\n a: name\n }\n}","variables":[{"__fusion_2_id":"1"},{"__fusion_2_id":"2"},{"__fusion_2_id":"3"},{"__fusion_2_id":"4"}]}] + """, + response); }); using var gateway = await CreateCompositeSchemaAsync( @@ -229,7 +430,7 @@ public async Task OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServ a: name } b: author { - b: name + b: name(postFix: "2") } } } @@ -243,6 +444,8 @@ public async Task OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServ await MatchSnapshotAsync(gateway, request, result); } + #endregion + // [Fact] // public async Task Fetch_With_ApolloRequestBatching_JsonLines() // { @@ -745,13 +948,7 @@ public static class SourceSchema1 public class Query { private readonly OrderedDictionary _books = - new() - { - [1] = new Book(1, "C# in Depth"), - [2] = new Book(2, "The Lord of the Rings"), - [3] = new Book(3, "The Hobbit"), - [4] = new Book(4, "The Silmarillion") - }; + new() { [1] = new Book(1, "C# in Depth"), [2] = new Book(2, "The Lord of the Rings") }; public IEnumerable GetBooks() => _books.Values; @@ -789,7 +986,46 @@ public record Book([property: ID] int Id) public record Author([property: ID] int Id) { - public string GetName() => "Author " + Id; + public string GetName(string? postFix = null) + { + var name = "Author " + Id; + + if (string.IsNullOrEmpty(postFix)) + { + return name; + } + + return name + " - " + postFix; + } + } + } + + private static async Task ReturnHttpResponse( + HttpRequestMessage request, + string expectedAcceptHeader, + string expectedBody, + HttpResponseMessage response) + { + var accept = request.Headers.Accept.ToString(); + + if (accept != expectedAcceptHeader || request.Content is null) + { + return ErrorHttpResponseMessage(); } + + var body = await request.Content.ReadAsStringAsync(); + + if (body != expectedBody) + { + return ErrorHttpResponseMessage(); + } + + return response; } + + private static HttpResponseMessage ErrorHttpResponseMessage() + => new HttpResponseMessage(HttpStatusCode.InternalServerError) + { + Content = new StringContent("Received an unexpected request.") + }; } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml new file mode 100644 index 00000000000..13f2eb4ccb3 --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml @@ -0,0 +1,221 @@ +title: MultiNode_BatchRequest_CustomAcceptHeader +request: + document: | + { + books { + a: author { + a: name + } + b: author { + b: name(postFix: "2") + } + } + } +response: + body: | + { + "data": { + "books": [ + { + "a": null, + "b": null + }, + { + "a": null, + "b": null + } + ] + }, + "errors": [ + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "b", + "b" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 1, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 1, + "b", + "b" + ] + } + ] + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "a": { + "id": "1" + }, + "b": { + "id": "1" + } + }, + { + "a": { + "id": "2" + }, + "b": { + "id": "2" + } + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name(postFix: String): String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } +operationPlan: + operation: + - document: | + { + books { + a: author { + a: name + id @fusion__requirement + } + b: author { + b: name(postFix: "2") + id @fusion__requirement + } + } + } + hash: 1b3419daa4dae74e12e1ad0237002b57 + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + source: $.authorById + target: $.books.b + batchingGroupId: 2 + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 + - id: 3 + type: Operation + schema: b + operation: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + source: $.authorById + target: $.books.a + batchingGroupId: 2 + requirements: + - name: __fusion_2_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml new file mode 100644 index 00000000000..ecf6b918154 --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml @@ -0,0 +1,221 @@ +title: MultiNode_BatchRequest_OnlyRequestBatching +request: + document: | + { + books { + a: author { + a: name + } + b: author { + b: name(postFix: "2") + } + } + } +response: + body: | + { + "data": { + "books": [ + { + "a": null, + "b": null + }, + { + "a": null, + "b": null + } + ] + }, + "errors": [ + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "b", + "b" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 1, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 1, + "b", + "b" + ] + } + ] + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "a": { + "id": "1" + }, + "b": { + "id": "1" + } + }, + { + "a": { + "id": "2" + }, + "b": { + "id": "2" + } + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name(postFix: String): String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } +operationPlan: + operation: + - document: | + { + books { + a: author { + a: name + id @fusion__requirement + } + b: author { + b: name(postFix: "2") + id @fusion__requirement + } + } + } + hash: 1b3419daa4dae74e12e1ad0237002b57 + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + source: $.authorById + target: $.books.b + batchingGroupId: 2 + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 + - id: 3 + type: Operation + schema: b + operation: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + source: $.authorById + target: $.books.a + batchingGroupId: 2 + requirements: + - name: __fusion_2_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml new file mode 100644 index 00000000000..3e7ec1edcca --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml @@ -0,0 +1,221 @@ +title: MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads +request: + document: | + { + books { + a: author { + a: name + } + b: author { + b: name(postFix: "2") + } + } + } +response: + body: | + { + "data": { + "books": [ + { + "a": null, + "b": null + }, + { + "a": null, + "b": null + } + ] + }, + "errors": [ + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "b", + "b" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 1, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 1, + "b", + "b" + ] + } + ] + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "a": { + "id": "1" + }, + "b": { + "id": "1" + } + }, + { + "a": { + "id": "2" + }, + "b": { + "id": "2" + } + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name(postFix: String): String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } +operationPlan: + operation: + - document: | + { + books { + a: author { + a: name + id @fusion__requirement + } + b: author { + b: name(postFix: "2") + id @fusion__requirement + } + } + } + hash: 1b3419daa4dae74e12e1ad0237002b57 + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + source: $.authorById + target: $.books.b + batchingGroupId: 2 + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 + - id: 3 + type: Operation + schema: b + operation: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + source: $.authorById + target: $.books.a + batchingGroupId: 2 + requirements: + - name: __fusion_2_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml new file mode 100644 index 00000000000..ef2fe28f965 --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml @@ -0,0 +1,221 @@ +title: MultiNode_BatchRequest_OnlyVariableBatching +request: + document: | + { + books { + a: author { + a: name + } + b: author { + b: name(postFix: "2") + } + } + } +response: + body: | + { + "data": { + "books": [ + { + "a": null, + "b": null + }, + { + "a": null, + "b": null + } + ] + }, + "errors": [ + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 0, + "b", + "b" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 1, + "a", + "a" + ] + }, + { + "message": "Unexpected Execution Error", + "path": [ + "books", + 1, + "b", + "b" + ] + } + ] + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "a": { + "id": "1" + }, + "b": { + "id": "1" + } + }, + { + "a": { + "id": "2" + }, + "b": { + "id": "2" + } + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name(postFix: String): String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } +operationPlan: + operation: + - document: | + { + books { + a: author { + a: name + id @fusion__requirement + } + b: author { + b: name(postFix: "2") + id @fusion__requirement + } + } + } + hash: 1b3419daa4dae74e12e1ad0237002b57 + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + source: $.authorById + target: $.books.b + batchingGroupId: 2 + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 + - id: 3 + type: Operation + schema: b + operation: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + source: $.authorById + target: $.books.a + batchingGroupId: 2 + requirements: + - name: __fusion_2_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching.yaml deleted file mode 100644 index a7fe7cfc648..00000000000 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching.yaml +++ /dev/null @@ -1,341 +0,0 @@ -title: OperationBatchRequest_OnlyRequestBatching -request: - document: | - { - books { - a: author { - a: name - } - b: author { - b: name - } - } - } -response: - body: | - { - "data": { - "books": [ - { - "a": { - "a": "Author 1" - }, - "b": { - "b": "Author 1" - } - }, - { - "a": { - "a": "Author 2" - }, - "b": { - "b": "Author 2" - } - }, - { - "a": { - "a": "Author 3" - }, - "b": { - "b": "Author 3" - } - }, - { - "a": { - "a": "Author 4" - }, - "b": { - "b": "Author 4" - } - } - ] - } - } -sourceSchemas: - - name: a - schema: | - schema { - query: Query - } - - type Author { - id: ID! - } - - type Book { - author: Author - id: ID! - title: String! - } - - type Query { - books: [Book!]! - bookById(id: ID!): Book @lookup @internal - authorById(id: ID!): Author @lookup @internal - } - interactions: - - request: - accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 - document: | - query Op_438caae6_1 { - books { - a: author { - id - } - b: author { - id - } - } - } - response: - results: - - | - { - "data": { - "books": [ - { - "a": { - "id": "1" - }, - "b": { - "id": "1" - } - }, - { - "a": { - "id": "2" - }, - "b": { - "id": "2" - } - }, - { - "a": { - "id": "3" - }, - "b": { - "id": "3" - } - }, - { - "a": { - "id": "4" - }, - "b": { - "id": "4" - } - } - ] - } - } - - name: b - schema: | - schema { - query: Query - } - - type Author { - name: String! - id: ID! - } - - type Book { - rating: String! - id: ID! - } - - type Query { - bookById(id: ID!): Book @lookup @internal - authorById(id: ID!): Author @lookup @internal - } - interactions: - - request: - accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 - kind: OperationBatch - items: - - document: | - query Op_438caae6_2( - $__fusion_1_id: ID! - ) { - authorById(id: $__fusion_1_id) { - b: name - } - } - variables: | - [ - { - "__fusion_1_id": "1" - }, - { - "__fusion_1_id": "2" - }, - { - "__fusion_1_id": "3" - }, - { - "__fusion_1_id": "4" - } - ] - - document: | - query Op_438caae6_3( - $__fusion_2_id: ID! - ) { - authorById(id: $__fusion_2_id) { - a: name - } - } - variables: | - [ - { - "__fusion_2_id": "1" - }, - { - "__fusion_2_id": "2" - }, - { - "__fusion_2_id": "3" - }, - { - "__fusion_2_id": "4" - } - ] - response: - contentType: application/jsonl; charset=utf-8 - results: - - | - { - "data": { - "authorById": { - "a": "Author 3" - } - } - } - - | - { - "data": { - "authorById": { - "a": "Author 4" - } - } - } - - | - { - "data": { - "authorById": { - "a": "Author 1" - } - } - } - - | - { - "data": { - "authorById": { - "a": "Author 2" - } - } - } - - | - { - "data": { - "authorById": { - "b": "Author 3" - } - } - } - - | - { - "data": { - "authorById": { - "b": "Author 4" - } - } - } - - | - { - "data": { - "authorById": { - "b": "Author 1" - } - } - } - - | - { - "data": { - "authorById": { - "b": "Author 2" - } - } - } -operationPlan: - operation: - - document: | - { - books { - a: author { - a: name - id @fusion__requirement - } - b: author { - b: name - id @fusion__requirement - } - } - } - hash: 438caae6f2bc97e0e430725aaac93641 - searchSpace: 1 - expandedNodes: 2 - nodes: - - id: 1 - type: Operation - schema: a - operation: | - query Op_438caae6_1 { - books { - a: author { - id - } - b: author { - id - } - } - } - - id: 2 - type: Operation - schema: b - operation: | - query Op_438caae6_2( - $__fusion_1_id: ID! - ) { - authorById(id: $__fusion_1_id) { - b: name - } - } - source: $.authorById - target: $.books.b - batchingGroupId: 2 - requirements: - - name: __fusion_1_id - selectionMap: >- - id - dependencies: - - id: 1 - - id: 3 - type: Operation - schema: b - operation: | - query Op_438caae6_3( - $__fusion_2_id: ID! - ) { - authorById(id: $__fusion_2_id) { - a: name - } - } - source: $.authorById - target: $.books.a - batchingGroupId: 2 - requirements: - - name: __fusion_2_id - selectionMap: >- - id - dependencies: - - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml deleted file mode 100644 index 989be259d7f..00000000000 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml +++ /dev/null @@ -1,357 +0,0 @@ -title: OperationBatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads -request: - document: | - { - books { - a: author { - a: name - } - b: author { - b: name - } - } - } -response: - body: | - { - "data": { - "books": [ - { - "a": null, - "b": null - }, - { - "a": { - "a": null - }, - "b": { - "b": null - } - }, - { - "a": { - "a": null - }, - "b": { - "b": null - } - }, - { - "a": { - "a": null - }, - "b": { - "b": null - } - } - ] - }, - "errors": [ - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "b", - "b" - ] - } - ] - } -sourceSchemas: - - name: a - schema: | - schema { - query: Query - } - - type Author { - id: ID! - } - - type Book { - author: Author - id: ID! - title: String! - } - - type Query { - books: [Book!]! - bookById(id: ID!): Book @lookup @internal - authorById(id: ID!): Author @lookup @internal - } - interactions: - - request: - accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 - document: | - query Op_438caae6_1 { - books { - a: author { - id - } - b: author { - id - } - } - } - response: - results: - - | - { - "data": { - "books": [ - { - "a": { - "id": "1" - }, - "b": { - "id": "1" - } - }, - { - "a": { - "id": "2" - }, - "b": { - "id": "2" - } - }, - { - "a": { - "id": "3" - }, - "b": { - "id": "3" - } - }, - { - "a": { - "id": "4" - }, - "b": { - "id": "4" - } - } - ] - } - } - - name: b - schema: | - schema { - query: Query - } - - type Author { - name: String! - id: ID! - } - - type Book { - rating: String! - id: ID! - } - - type Query { - bookById(id: ID!): Book @lookup @internal - authorById(id: ID!): Author @lookup @internal - } - interactions: - - request: - accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 - kind: OperationBatch - items: - - document: | - query Op_438caae6_2( - $__fusion_1_id: ID! - ) { - authorById(id: $__fusion_1_id) { - b: name - } - } - variables: | - [ - { - "__fusion_1_id": "1" - }, - { - "__fusion_1_id": "2" - }, - { - "__fusion_1_id": "3" - }, - { - "__fusion_1_id": "4" - } - ] - - document: | - query Op_438caae6_3( - $__fusion_2_id: ID! - ) { - authorById(id: $__fusion_2_id) { - a: name - } - } - variables: | - [ - { - "__fusion_2_id": "1" - }, - { - "__fusion_2_id": "2" - }, - { - "__fusion_2_id": "3" - }, - { - "__fusion_2_id": "4" - } - ] - response: - contentType: text/event-stream; charset=utf-8 - results: - - | - { - "data": { - "bookById": { - "rating": "1" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "1" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "2" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "2" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "3" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "3" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "4" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "4" - } - } - } -operationPlan: - operation: - - document: | - { - books { - a: author { - a: name - id @fusion__requirement - } - b: author { - b: name - id @fusion__requirement - } - } - } - hash: 438caae6f2bc97e0e430725aaac93641 - searchSpace: 1 - expandedNodes: 2 - nodes: - - id: 1 - type: Operation - schema: a - operation: | - query Op_438caae6_1 { - books { - a: author { - id - } - b: author { - id - } - } - } - - id: 2 - type: Operation - schema: b - operation: | - query Op_438caae6_2( - $__fusion_1_id: ID! - ) { - authorById(id: $__fusion_1_id) { - b: name - } - } - source: $.authorById - target: $.books.b - batchingGroupId: 2 - requirements: - - name: __fusion_1_id - selectionMap: >- - id - dependencies: - - id: 1 - - id: 3 - type: Operation - schema: b - operation: | - query Op_438caae6_3( - $__fusion_2_id: ID! - ) { - authorById(id: $__fusion_2_id) { - a: name - } - } - source: $.authorById - target: $.books.a - batchingGroupId: 2 - requirements: - - name: __fusion_2_id - selectionMap: >- - id - dependencies: - - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_CustomAcceptHeader.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_CustomAcceptHeader.yaml new file mode 100644 index 00000000000..c91c84ce3bc --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_CustomAcceptHeader.yaml @@ -0,0 +1,168 @@ +title: SingleNode_BatchRequest_CustomAcceptHeader +request: + document: | + { + books { + rating + } + } +response: + body: | + { + "data": { + "books": [ + { + "rating": "1" + }, + { + "rating": "2" + } + ] + } + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_490e9345_1 { + books { + id + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "id": "1" + }, + { + "id": "2" + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name(postFix: String): String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/jsonl + document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + [ + { + "__fusion_1_id": "1" + }, + { + "__fusion_1_id": "2" + } + ] + response: + contentType: application/jsonl; charset=utf-8 + results: + - | + { + "data": { + "bookById": { + "rating": "1" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "2" + } + } + } +operationPlan: + operation: + - document: | + { + books { + rating + id @fusion__requirement + } + } + hash: 490e934563f9d79a50edbb76c6b9b5cc + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_490e9345_1 { + books { + id + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + source: $.bookById + target: $.books + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching.yaml similarity index 73% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching.yaml index ad33efee173..1e75424cd5d 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching.yaml @@ -1,4 +1,4 @@ -title: BatchRequest_OnlyRequestBatching +title: SingleNode_BatchRequest_OnlyRequestBatching request: document: | { @@ -16,12 +16,6 @@ response: }, { "rating": "2" - }, - { - "rating": "3" - }, - { - "rating": "4" } ] } @@ -68,12 +62,6 @@ sourceSchemas: }, { "id": "2" - }, - { - "id": "3" - }, - { - "id": "4" } ] } @@ -85,7 +73,7 @@ sourceSchemas: } type Author { - name: String! + name(postFix: String): String! id: ID! } @@ -127,30 +115,6 @@ sourceSchemas: { "__fusion_1_id": "2" } - - document: | - query Op_490e9345_2( - $__fusion_1_id: ID! - ) { - bookById(id: $__fusion_1_id) { - rating - } - } - variables: | - { - "__fusion_1_id": "3" - } - - document: | - query Op_490e9345_2( - $__fusion_1_id: ID! - ) { - bookById(id: $__fusion_1_id) { - rating - } - } - variables: | - { - "__fusion_1_id": "4" - } response: contentType: application/jsonl; charset=utf-8 results: @@ -170,22 +134,6 @@ sourceSchemas: } } } - - | - { - "data": { - "bookById": { - "rating": "3" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "4" - } - } - } operationPlan: operation: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml similarity index 73% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml index f7898074c3d..f7e9c5396f0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml @@ -1,4 +1,4 @@ -title: BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads +title: SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads request: document: | { @@ -16,12 +16,6 @@ response: }, { "rating": "2" - }, - { - "rating": "3" - }, - { - "rating": "4" } ] } @@ -68,12 +62,6 @@ sourceSchemas: }, { "id": "2" - }, - { - "id": "3" - }, - { - "id": "4" } ] } @@ -85,7 +73,7 @@ sourceSchemas: } type Author { - name: String! + name(postFix: String): String! id: ID! } @@ -127,30 +115,6 @@ sourceSchemas: { "__fusion_1_id": "2" } - - document: | - query Op_490e9345_2( - $__fusion_1_id: ID! - ) { - bookById(id: $__fusion_1_id) { - rating - } - } - variables: | - { - "__fusion_1_id": "3" - } - - document: | - query Op_490e9345_2( - $__fusion_1_id: ID! - ) { - bookById(id: $__fusion_1_id) { - rating - } - } - variables: | - { - "__fusion_1_id": "4" - } response: contentType: text/event-stream; charset=utf-8 results: @@ -170,22 +134,6 @@ sourceSchemas: } } } - - | - { - "data": { - "bookById": { - "rating": "3" - } - } - } - - | - { - "data": { - "bookById": { - "rating": "4" - } - } - } operationPlan: operation: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyVariableBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyVariableBatching.yaml new file mode 100644 index 00000000000..98a7807464c --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyVariableBatching.yaml @@ -0,0 +1,168 @@ +title: SingleNode_BatchRequest_OnlyVariableBatching +request: + document: | + { + books { + rating + } + } +response: + body: | + { + "data": { + "books": [ + { + "rating": "1" + }, + { + "rating": "2" + } + ] + } + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_490e9345_1 { + books { + id + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "id": "1" + }, + { + "id": "2" + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name(postFix: String): String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + [ + { + "__fusion_1_id": "1" + }, + { + "__fusion_1_id": "2" + } + ] + response: + contentType: application/jsonl; charset=utf-8 + results: + - | + { + "data": { + "bookById": { + "rating": "1" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "2" + } + } + } +operationPlan: + operation: + - document: | + { + books { + rating + id @fusion__requirement + } + } + hash: 490e934563f9d79a50edbb76c6b9b5cc + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_490e9345_1 { + books { + id + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + source: $.bookById + target: $.books + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_Request_CustomAcceptHeader.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_Request_CustomAcceptHeader.yaml new file mode 100644 index 00000000000..7ccb8b7084b --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_Request_CustomAcceptHeader.yaml @@ -0,0 +1,90 @@ +title: SingleNode_Request_CustomAcceptHeader +request: + document: | + { + books { + title + } + } +response: + body: | + { + "data": { + "books": [ + { + "title": "C# in Depth" + }, + { + "title": "The Lord of the Rings" + } + ] + } + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/json + document: | + query Op_7d0b6399_1 { + books { + title + } + } + response: + contentType: application/json; charset=utf-8 + results: + - | + { + "data": { + "books": [ + { + "title": "C# in Depth" + }, + { + "title": "The Lord of the Rings" + } + ] + } + } +operationPlan: + operation: + - document: | + { + books { + title + } + } + hash: 7d0b63998765c936a0199cfb040fae0d + searchSpace: 1 + expandedNodes: 1 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_7d0b6399_1 { + books { + title + } + } From d9c0eeea44f065d6c7bcb95f676c280d17dba451 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:32:01 +0200 Subject: [PATCH 4/6] wip --- .../Clients/SourceSchemaHttpClient.cs | 32 ++++- ...iNode_BatchRequest_CustomAcceptHeader.yaml | 130 +++++++++++------ ...Node_BatchRequest_OnlyRequestBatching.yaml | 131 +++++++++++++----- ...tching_NoRequestIndexInServerPayloads.yaml | 56 ++++++++ ...ode_BatchRequest_OnlyVariableBatching.yaml | 130 +++++++++++------ .../SourceSchemaClientCapabilitiesTests.cs | 9 ++ 6 files changed, 368 insertions(+), 120 deletions(-) create mode 100644 src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/SourceSchemaClientCapabilitiesTests.cs diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs index 93284343cdb..e46e4d6405c 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs @@ -290,7 +290,17 @@ private GraphQLHttpRequest CreateHttpBatchRequest( { if (requiresFileUpload) { - var batchRequests = ImmutableArray.CreateBuilder(); + var capacity = originalRequests.Length; + + foreach (var sourceRequest in originalRequests) + { + if (sourceRequest.Variables.Length > 1) + { + capacity += sourceRequest.Variables.Length - 1; + } + } + + var batchRequests = ImmutableArray.CreateBuilder(capacity); var fileEntries = ImmutableArray.CreateBuilder(); var fileLookup = context.RequestContext.Features.GetRequired(); buffer ??= new ChunkedArrayWriter(); @@ -351,7 +361,23 @@ private GraphQLHttpRequest CreateHttpBatchRequest( } else { - var batchRequests = ImmutableArray.CreateBuilder(); + var supportsVariableBatching = + _configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching); + + var capacity = originalRequests.Length; + + if (!supportsVariableBatching) + { + foreach (var sourceRequest in originalRequests) + { + if (sourceRequest.Variables.Length > 1) + { + capacity += sourceRequest.Variables.Length - 1; + } + } + } + + var batchRequests = ImmutableArray.CreateBuilder(capacity); foreach (var sourceRequest in originalRequests) { @@ -362,7 +388,7 @@ private GraphQLHttpRequest CreateHttpBatchRequest( break; default: - if (_configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching)) + if (supportsVariableBatching) { batchRequests.Add(CreateVariableBatchRequest( sourceRequest.OperationSourceText, sourceRequest)); diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml index 13f2eb4ccb3..1e480c1d5b3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml @@ -17,53 +17,23 @@ response: "data": { "books": [ { - "a": null, - "b": null + "a": { + "a": "Author 1" + }, + "b": { + "b": "Author 1 - 2" + } }, { - "a": null, - "b": null + "a": { + "a": "Author 2" + }, + "b": { + "b": "Author 2 - 2" + } } ] - }, - "errors": [ - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "b", - "b" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 1, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 1, - "b", - "b" - ] - } - ] + } } sourceSchemas: - name: a @@ -146,6 +116,80 @@ sourceSchemas: bookById(id: ID!): Book @lookup @internal authorById(id: ID!): Author @lookup @internal } + interactions: + - request: + accept: application/jsonl + kind: OperationBatch + items: + - document: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + variables: | + [ + { + "__fusion_1_id": "1" + }, + { + "__fusion_1_id": "2" + } + ] + - document: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + [ + { + "__fusion_2_id": "1" + }, + { + "__fusion_2_id": "2" + } + ] + response: + contentType: application/jsonl; charset=utf-8 + results: + - | + { + "data": { + "authorById": { + "a": "Author 1" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 1 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 2 - 2" + } + } + } operationPlan: operation: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml index ecf6b918154..0d6e5ff3810 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml @@ -17,12 +17,20 @@ response: "data": { "books": [ { - "a": null, - "b": null + "a": { + "a": null + }, + "b": { + "b": "Author 1 - 2" + } }, { - "a": null, - "b": null + "a": { + "a": null + }, + "b": { + "b": "Author 1 - 2" + } } ] }, @@ -32,33 +40,6 @@ response: "path": [ "books", 0, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "b", - "b" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 1, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 1, "b", "b" ] @@ -146,6 +127,94 @@ sourceSchemas: bookById(id: ID!): Book @lookup @internal authorById(id: ID!): Author @lookup @internal } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + variables: | + { + "__fusion_1_id": "1" + } + - document: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + variables: | + { + "__fusion_1_id": "2" + } + - document: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + { + "__fusion_2_id": "1" + } + - document: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + { + "__fusion_2_id": "2" + } + response: + contentType: application/jsonl; charset=utf-8 + results: + - | + { + "data": { + "authorById": { + "b": "Author 1 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 1 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 2 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 2 - 2" + } + } + } operationPlan: operation: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml index 3e7ec1edcca..59f7b7b83e3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml @@ -146,6 +146,62 @@ sourceSchemas: bookById(id: ID!): Book @lookup @internal authorById(id: ID!): Author @lookup @internal } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + variables: | + { + "__fusion_1_id": "1" + } + - document: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + variables: | + { + "__fusion_1_id": "2" + } + - document: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + { + "__fusion_2_id": "1" + } + - document: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + { + "__fusion_2_id": "2" + } + response: + statusCode: 500 + contentType: text/plain; charset=utf-8 operationPlan: operation: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml index ef2fe28f965..935e7009800 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml @@ -17,53 +17,23 @@ response: "data": { "books": [ { - "a": null, - "b": null + "a": { + "a": "Author 1" + }, + "b": { + "b": "Author 1 - 2" + } }, { - "a": null, - "b": null + "a": { + "a": "Author 2" + }, + "b": { + "b": "Author 2 - 2" + } } ] - }, - "errors": [ - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "b", - "b" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 1, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 1, - "b", - "b" - ] - } - ] + } } sourceSchemas: - name: a @@ -146,6 +116,80 @@ sourceSchemas: bookById(id: ID!): Book @lookup @internal authorById(id: ID!): Author @lookup @internal } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + variables: | + [ + { + "__fusion_1_id": "1" + }, + { + "__fusion_1_id": "2" + } + ] + - document: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + [ + { + "__fusion_2_id": "1" + }, + { + "__fusion_2_id": "2" + } + ] + response: + contentType: application/jsonl; charset=utf-8 + results: + - | + { + "data": { + "authorById": { + "a": "Author 1" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 1 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 2 - 2" + } + } + } operationPlan: operation: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/SourceSchemaClientCapabilitiesTests.cs b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/SourceSchemaClientCapabilitiesTests.cs new file mode 100644 index 00000000000..ffb58ead358 --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/SourceSchemaClientCapabilitiesTests.cs @@ -0,0 +1,9 @@ +namespace HotChocolate.Fusion.Transport; + +public class SourceSchemaClientCapabilitiesTests : FusionTestBase +{ + public async Task Test() + { + + } +} From 38601ee49ef75ecd546dbb2dfbecf046f4b5b932 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:56:55 +0200 Subject: [PATCH 5/6] Fix tests --- .../Clients/SourceSchemaClientCapabilities.cs | 9 +- .../Execution/FusionRequestExecutorManager.cs | 6 - .../SourceSchemaClientCapabilitiesTests.cs | 170 ++++++++++- ...ests.BatchRequest_CustomAcceptHeader.yaml} | 2 +- ...sts.BatchRequest_OnlyRequestBatching.yaml} | 2 +- ...equestBatching_ServerReturnsJsonArray.yaml | 177 +++++++++++ ...tching_ServerReturnsNoRequestIndices.yaml} | 2 +- ...ts.BatchRequest_OnlyVariableBatching.yaml} | 2 +- ...atch_BatchRequest_CustomAcceptHeader.yaml} | 2 +- ...tch_BatchRequest_OnlyRequestBatching.yaml} | 27 +- ...questBatching_ServerReturnsJsonArray.yaml} | 94 +++--- ...atching_ServerReturnsNoRequestIndices.yaml | 279 ++++++++++++++++++ ...ch_BatchRequest_OnlyVariableBatching.yaml} | 2 +- ...s.SingularRequest_CustomAcceptHeader.yaml} | 2 +- .../SourceSchemaClientCapabilitiesTests.cs | 9 - 15 files changed, 675 insertions(+), 110 deletions(-) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_CustomAcceptHeader.yaml => SourceSchemaClientCapabilitiesTests.BatchRequest_CustomAcceptHeader.yaml} (98%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching.yaml => SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml} (98%) create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray.yaml rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml => SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices.yaml} (97%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyVariableBatching.yaml => SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyVariableBatching.yaml} (98%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml => SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_CustomAcceptHeader.yaml} (99%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml => SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching.yaml} (93%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml => SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray.yaml} (81%) create mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices.yaml rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml => SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyVariableBatching.yaml} (99%) rename src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/{SourceSchemaClientCapabilitiesTests.SingleNode_Request_CustomAcceptHeader.yaml => SourceSchemaClientCapabilitiesTests.SingularRequest_CustomAcceptHeader.yaml} (97%) delete mode 100644 src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/SourceSchemaClientCapabilitiesTests.cs diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaClientCapabilities.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaClientCapabilities.cs index 226ae8e52db..1812f2c4cc4 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaClientCapabilities.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaClientCapabilities.cs @@ -20,12 +20,5 @@ public enum SourceSchemaClientCapabilities /// The client supports request batching, where multiple independent GraphQL /// operations are sent as an array in a single HTTP request. /// - RequestBatching = 1 << 2, - - /// - /// The client supports the Apollo-style request batching format, where multiple independent GraphQL - /// operations are sent as an array in a single HTTP request. - /// The server returns an in-order JSON array of responses. - /// - ApolloRequestBatching = 1 << 3 + RequestBatching = 1 << 2 } diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestExecutorManager.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestExecutorManager.cs index c669f36089d..fb5ccd24b8c 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestExecutorManager.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/FusionRequestExecutorManager.cs @@ -373,12 +373,6 @@ private static SourceSchemaHttpClientConfiguration CreateHttpClientConfiguration capabilities |= SourceSchemaClientCapabilities.RequestBatching; } - if (!variableBatching.TryGetProperty("apolloRequestBatching", out supported) - || supported.GetBoolean()) - { - capabilities |= SourceSchemaClientCapabilities.ApolloRequestBatching; - } - if (variableBatching.TryGetProperty("formats", out var formats)) { var builder = ImmutableArray.CreateBuilder(); diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs index 854b9493d3d..3c1898330d9 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs @@ -10,13 +10,13 @@ namespace HotChocolate.Fusion; -// TODO: MultiNode_BatchRequest_OnlyRequestBatching_* is failing, since the reading in SourceSchemaHttpClient is wrong. +// Note: We do not currently handle the case that Variable Batching is supported, but Request Batching isn't. public class SourceSchemaClientCapabilitiesTests : FusionTestBase { - #region Single Node Request + #region Singular Request [Fact] - public async Task SingleNode_Request_CustomAcceptHeader() + public async Task SingularRequest_CustomAcceptHeader() { // arrange using var server1 = CreateSourceSchema( @@ -51,10 +51,10 @@ public async Task SingleNode_Request_CustomAcceptHeader() #endregion - #region Single Node Batch Request + #region Batch Request [Fact] - public async Task SingleNode_BatchRequest_CustomAcceptHeader() + public async Task BatchRequest_CustomAcceptHeader() { // arrange using var server1 = CreateSourceSchema( @@ -93,7 +93,7 @@ public async Task SingleNode_BatchRequest_CustomAcceptHeader() } [Fact] - public async Task SingleNode_BatchRequest_OnlyVariableBatching() + public async Task BatchRequest_OnlyVariableBatching() { // arrange using var server1 = CreateSourceSchema( @@ -132,7 +132,7 @@ public async Task SingleNode_BatchRequest_OnlyVariableBatching() } [Fact] - public async Task SingleNode_BatchRequest_OnlyRequestBatching() + public async Task BatchRequest_OnlyRequestBatching() { // arrange using var server1 = CreateSourceSchema( @@ -172,7 +172,7 @@ public async Task SingleNode_BatchRequest_OnlyRequestBatching() // This tests the response of HotChocolate < 15 servers [Fact] - public async Task SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads() + public async Task BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices() { // arrange using var server1 = CreateSourceSchema( @@ -237,12 +237,76 @@ public async Task SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInSe await MatchSnapshotAsync(gateway, request, result); } + // This tests the response of non-HotChocolate servers + [Fact] + public async Task BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.RequestBatching, + mockHttpResponse: async request => + { + var response = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent( + """ + [ + {"data":{"bookById":{"rating":"1"}}}, + {"data":{"bookById":{"rating":"2"}}} + ] + """, + Encoding.UTF8, + "application/json") + }; + + return await ReturnHttpResponse( + request, + "application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8", + """ + [{"query":"query Op_490e9345_2(\n $__fusion_1_id: ID!\n) {\n bookById(id: $__fusion_1_id) {\n rating\n }\n}","variables":{"__fusion_1_id":"1"}},{"query":"query Op_490e9345_2(\n $__fusion_1_id: ID!\n) {\n bookById(id: $__fusion_1_id) {\n rating\n }\n}","variables":{"__fusion_1_id":"2"}}] + """, + response + ); + }); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + rating + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + #endregion - #region Multi Node Batch + #region OperationBatch Batch Request [Fact] - public async Task MultiNode_BatchRequest_CustomAcceptHeader() + public async Task OperationBatch_BatchRequest_CustomAcceptHeader() { // arrange using var server1 = CreateSourceSchema( @@ -286,7 +350,7 @@ public async Task MultiNode_BatchRequest_CustomAcceptHeader() } [Fact] - public async Task MultiNode_BatchRequest_OnlyVariableBatching() + public async Task OperationBatch_BatchRequest_OnlyVariableBatching() { // arrange using var server1 = CreateSourceSchema( @@ -330,7 +394,7 @@ public async Task MultiNode_BatchRequest_OnlyVariableBatching() } [Fact] - public async Task MultiNode_BatchRequest_OnlyRequestBatching() + public async Task OperationBatch_BatchRequest_OnlyRequestBatching() { // arrange using var server1 = CreateSourceSchema( @@ -375,7 +439,7 @@ public async Task MultiNode_BatchRequest_OnlyRequestBatching() // This tests the response of HotChocolate < 15 servers [Fact] - public async Task MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads() + public async Task OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices() { // arrange using var server1 = CreateSourceSchema( @@ -396,7 +460,13 @@ public async Task MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInSer data: {"data":{"authorById":{"b":"Author 1 - 2"}}} event: next - data: {"data":{"authorById":{"b":"Author 1 - 2"}}} + data: {"data":{"authorById":{"b":"Author 2 - 2"}}} + + event: next + data: {"data":{"authorById":{"a":"Author 1"}}} + + event: next + data: {"data":{"authorById":{"a":"Author 2"}}} event: complete """, @@ -408,7 +478,77 @@ public async Task MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInSer request, "application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8", """ - [{"query":"query Op_1b3419da_2(\n $__fusion_1_id: ID!\n) {\n authorById(id: $__fusion_1_id) {\n b: name(postFix: \"2\")\n }\n}","variables":[{"__fusion_1_id":"1"},{"__fusion_1_id":"2"},{"__fusion_1_id":"3"},{"__fusion_1_id":"4"}]},{"query":"query Op_1b3419da_3(\n $__fusion_2_id: ID!\n) {\n authorById(id: $__fusion_2_id) {\n a: name\n }\n}","variables":[{"__fusion_2_id":"1"},{"__fusion_2_id":"2"},{"__fusion_2_id":"3"},{"__fusion_2_id":"4"}]}] + [{"query":"query Op_1b3419da_2(\n $__fusion_1_id: ID!\n) {\n authorById(id: $__fusion_1_id) {\n b: name(postFix: \"2\")\n }\n}","variables":{"__fusion_1_id":"1"}},{"query":"query Op_1b3419da_2(\n $__fusion_1_id: ID!\n) {\n authorById(id: $__fusion_1_id) {\n b: name(postFix: \"2\")\n }\n}","variables":{"__fusion_1_id":"2"}},{"query":"query Op_1b3419da_3(\n $__fusion_2_id: ID!\n) {\n authorById(id: $__fusion_2_id) {\n a: name\n }\n}","variables":{"__fusion_2_id":"1"}},{"query":"query Op_1b3419da_3(\n $__fusion_2_id: ID!\n) {\n authorById(id: $__fusion_2_id) {\n a: name\n }\n}","variables":{"__fusion_2_id":"2"}}] + """, + response); + }); + + using var gateway = await CreateCompositeSchemaAsync( + [ + ("a", server1), + ("b", server2) + ]); + + // act + using var client = GraphQLHttpClient.Create(gateway.CreateClient()); + + var request = new OperationRequest( + """ + { + books { + a: author { + a: name + } + b: author { + b: name(postFix: "2") + } + } + } + """); + + using var result = await client.PostAsync( + request, + new Uri("http://localhost:5000/graphql")); + + // assert + await MatchSnapshotAsync(gateway, request, result); + } + + // This tests the response of non-HotChocolate servers + [Fact] + public async Task OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray() + { + // arrange + using var server1 = CreateSourceSchema( + "a", + b => b.AddQueryType()); + + using var server2 = CreateSourceSchema( + "b", + b => b.AddQueryType(), + capabilities: SourceSchemaClientCapabilities.RequestBatching, + mockHttpResponse: async request => + { + var response = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent( + """ + [ + {"data":{"authorById":{"b":"Author 1 - 2"}}}, + {"data":{"authorById":{"b":"Author 2 - 2"}}}, + {"data":{"authorById":{"a":"Author 1"}}}, + {"data":{"authorById":{"a":"Author 2"}}} + ] + """, + Encoding.UTF8, + "application/json") + }; + + return await ReturnHttpResponse( + request, + "application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8", + """ + [{"query":"query Op_1b3419da_2(\n $__fusion_1_id: ID!\n) {\n authorById(id: $__fusion_1_id) {\n b: name(postFix: \"2\")\n }\n}","variables":{"__fusion_1_id":"1"}},{"query":"query Op_1b3419da_2(\n $__fusion_1_id: ID!\n) {\n authorById(id: $__fusion_1_id) {\n b: name(postFix: \"2\")\n }\n}","variables":{"__fusion_1_id":"2"}},{"query":"query Op_1b3419da_3(\n $__fusion_2_id: ID!\n) {\n authorById(id: $__fusion_2_id) {\n a: name\n }\n}","variables":{"__fusion_2_id":"1"}},{"query":"query Op_1b3419da_3(\n $__fusion_2_id: ID!\n) {\n authorById(id: $__fusion_2_id) {\n a: name\n }\n}","variables":{"__fusion_2_id":"2"}}] """, response); }); diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_CustomAcceptHeader.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_CustomAcceptHeader.yaml similarity index 98% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_CustomAcceptHeader.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_CustomAcceptHeader.yaml index c91c84ce3bc..0af926aa732 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_CustomAcceptHeader.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_CustomAcceptHeader.yaml @@ -1,4 +1,4 @@ -title: SingleNode_BatchRequest_CustomAcceptHeader +title: BatchRequest_CustomAcceptHeader request: document: | { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml similarity index 98% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml index 1e75424cd5d..c9b35c15f48 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching.yaml @@ -1,4 +1,4 @@ -title: SingleNode_BatchRequest_OnlyRequestBatching +title: BatchRequest_OnlyRequestBatching request: document: | { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray.yaml new file mode 100644 index 00000000000..8c03ecb904f --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray.yaml @@ -0,0 +1,177 @@ +title: BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray +request: + document: | + { + books { + rating + } + } +response: + body: | + { + "data": { + "books": [ + { + "rating": "1" + }, + { + "rating": "2" + } + ] + } + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_490e9345_1 { + books { + id + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "id": "1" + }, + { + "id": "2" + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name(postFix: String): String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "1" + } + - document: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + variables: | + { + "__fusion_1_id": "2" + } + response: + contentType: application/json; charset=utf-8 + results: + - | + { + "data": { + "bookById": { + "rating": "1" + } + } + } + - | + { + "data": { + "bookById": { + "rating": "2" + } + } + } +operationPlan: + operation: + - document: | + { + books { + rating + id @fusion__requirement + } + } + hash: 490e934563f9d79a50edbb76c6b9b5cc + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_490e9345_1 { + books { + id + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_490e9345_2( + $__fusion_1_id: ID! + ) { + bookById(id: $__fusion_1_id) { + rating + } + } + source: $.bookById + target: $.books + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices.yaml similarity index 97% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices.yaml index f7e9c5396f0..d00dd7ba206 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices.yaml @@ -1,4 +1,4 @@ -title: SingleNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads +title: BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices request: document: | { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyVariableBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyVariableBatching.yaml similarity index 98% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyVariableBatching.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyVariableBatching.yaml index 98a7807464c..be3b959cee8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_BatchRequest_OnlyVariableBatching.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.BatchRequest_OnlyVariableBatching.yaml @@ -1,4 +1,4 @@ -title: SingleNode_BatchRequest_OnlyVariableBatching +title: BatchRequest_OnlyVariableBatching request: document: | { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_CustomAcceptHeader.yaml similarity index 99% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_CustomAcceptHeader.yaml index 1e480c1d5b3..fb6c44db758 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_CustomAcceptHeader.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_CustomAcceptHeader.yaml @@ -1,4 +1,4 @@ -title: MultiNode_BatchRequest_CustomAcceptHeader +title: OperationBatch_BatchRequest_CustomAcceptHeader request: document: | { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching.yaml similarity index 93% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching.yaml index 0d6e5ff3810..756137a9977 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching.yaml @@ -1,4 +1,4 @@ -title: MultiNode_BatchRequest_OnlyRequestBatching +title: OperationBatch_BatchRequest_OnlyRequestBatching request: document: | { @@ -18,7 +18,7 @@ response: "books": [ { "a": { - "a": null + "a": "Author 1" }, "b": { "b": "Author 1 - 2" @@ -26,25 +26,14 @@ response: }, { "a": { - "a": null + "a": "Author 2" }, "b": { - "b": "Author 1 - 2" + "b": "Author 2 - 2" } } ] - }, - "errors": [ - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "b", - "b" - ] - } - ] + } } sourceSchemas: - name: a @@ -195,7 +184,7 @@ sourceSchemas: { "data": { "authorById": { - "b": "Author 1 - 2" + "b": "Author 2 - 2" } } } @@ -203,7 +192,7 @@ sourceSchemas: { "data": { "authorById": { - "b": "Author 2 - 2" + "a": "Author 1" } } } @@ -211,7 +200,7 @@ sourceSchemas: { "data": { "authorById": { - "b": "Author 2 - 2" + "a": "Author 2" } } } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray.yaml similarity index 81% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray.yaml index 59f7b7b83e3..7fd6922eaa6 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray.yaml @@ -1,4 +1,4 @@ -title: MultiNode_BatchRequest_OnlyRequestBatching_NoRequestIndexInServerPayloads +title: OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsJsonArray request: document: | { @@ -17,53 +17,23 @@ response: "data": { "books": [ { - "a": null, - "b": null + "a": { + "a": "Author 1" + }, + "b": { + "b": "Author 1 - 2" + } }, { - "a": null, - "b": null + "a": { + "a": "Author 2" + }, + "b": { + "b": "Author 2 - 2" + } } ] - }, - "errors": [ - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 0, - "b", - "b" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 1, - "a", - "a" - ] - }, - { - "message": "Unexpected Execution Error", - "path": [ - "books", - 1, - "b", - "b" - ] - } - ] + } } sourceSchemas: - name: a @@ -200,8 +170,40 @@ sourceSchemas: "__fusion_2_id": "2" } response: - statusCode: 500 - contentType: text/plain; charset=utf-8 + contentType: application/json; charset=utf-8 + results: + - | + { + "data": { + "authorById": { + "b": "Author 1 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 2 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 1" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 2" + } + } + } operationPlan: operation: - document: | diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices.yaml new file mode 100644 index 00000000000..48b8c8cd194 --- /dev/null +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices.yaml @@ -0,0 +1,279 @@ +title: OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsNoRequestIndices +request: + document: | + { + books { + a: author { + a: name + } + b: author { + b: name(postFix: "2") + } + } + } +response: + body: | + { + "data": { + "books": [ + { + "a": { + "a": "Author 1" + }, + "b": { + "b": "Author 1 - 2" + } + }, + { + "a": { + "a": "Author 2" + }, + "b": { + "b": "Author 2 - 2" + } + } + ] + } + } +sourceSchemas: + - name: a + schema: | + schema { + query: Query + } + + type Author { + id: ID! + } + + type Book { + author: Author + id: ID! + title: String! + } + + type Query { + books: [Book!]! + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/graphql-response+json; charset=utf-8, application/json; charset=utf-8, application/jsonl; charset=utf-8, text/event-stream; charset=utf-8 + document: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + response: + results: + - | + { + "data": { + "books": [ + { + "a": { + "id": "1" + }, + "b": { + "id": "1" + } + }, + { + "a": { + "id": "2" + }, + "b": { + "id": "2" + } + } + ] + } + } + - name: b + schema: | + schema { + query: Query + } + + type Author { + name(postFix: String): String! + id: ID! + } + + type Book { + rating: String! + id: ID! + } + + type Query { + bookById(id: ID!): Book @lookup @internal + authorById(id: ID!): Author @lookup @internal + } + interactions: + - request: + accept: application/jsonl; charset=utf-8, text/event-stream; charset=utf-8, application/graphql-response+json; charset=utf-8, application/json; charset=utf-8 + kind: OperationBatch + items: + - document: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + variables: | + { + "__fusion_1_id": "1" + } + - document: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + variables: | + { + "__fusion_1_id": "2" + } + - document: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + { + "__fusion_2_id": "1" + } + - document: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + variables: | + { + "__fusion_2_id": "2" + } + response: + contentType: text/event-stream; charset=utf-8 + results: + - | + { + "data": { + "authorById": { + "b": "Author 1 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "b": "Author 2 - 2" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 1" + } + } + } + - | + { + "data": { + "authorById": { + "a": "Author 2" + } + } + } +operationPlan: + operation: + - document: | + { + books { + a: author { + a: name + id @fusion__requirement + } + b: author { + b: name(postFix: "2") + id @fusion__requirement + } + } + } + hash: 1b3419daa4dae74e12e1ad0237002b57 + searchSpace: 1 + expandedNodes: 2 + nodes: + - id: 1 + type: Operation + schema: a + operation: | + query Op_1b3419da_1 { + books { + a: author { + id + } + b: author { + id + } + } + } + - id: 2 + type: Operation + schema: b + operation: | + query Op_1b3419da_2( + $__fusion_1_id: ID! + ) { + authorById(id: $__fusion_1_id) { + b: name(postFix: "2") + } + } + source: $.authorById + target: $.books.b + batchingGroupId: 2 + requirements: + - name: __fusion_1_id + selectionMap: >- + id + dependencies: + - id: 1 + - id: 3 + type: Operation + schema: b + operation: | + query Op_1b3419da_3( + $__fusion_2_id: ID! + ) { + authorById(id: $__fusion_2_id) { + a: name + } + } + source: $.authorById + target: $.books.a + batchingGroupId: 2 + requirements: + - name: __fusion_2_id + selectionMap: >- + id + dependencies: + - id: 1 diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyVariableBatching.yaml similarity index 99% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyVariableBatching.yaml index 935e7009800..9d8e834daf2 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.MultiNode_BatchRequest_OnlyVariableBatching.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.OperationBatch_BatchRequest_OnlyVariableBatching.yaml @@ -1,4 +1,4 @@ -title: MultiNode_BatchRequest_OnlyVariableBatching +title: OperationBatch_BatchRequest_OnlyVariableBatching request: document: | { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_Request_CustomAcceptHeader.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingularRequest_CustomAcceptHeader.yaml similarity index 97% rename from src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_Request_CustomAcceptHeader.yaml rename to src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingularRequest_CustomAcceptHeader.yaml index 7ccb8b7084b..f8be9d9b439 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingleNode_Request_CustomAcceptHeader.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaClientCapabilitiesTests.SingularRequest_CustomAcceptHeader.yaml @@ -1,4 +1,4 @@ -title: SingleNode_Request_CustomAcceptHeader +title: SingularRequest_CustomAcceptHeader request: document: | { diff --git a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/SourceSchemaClientCapabilitiesTests.cs b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/SourceSchemaClientCapabilitiesTests.cs deleted file mode 100644 index ffb58ead358..00000000000 --- a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/SourceSchemaClientCapabilitiesTests.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace HotChocolate.Fusion.Transport; - -public class SourceSchemaClientCapabilitiesTests : FusionTestBase -{ - public async Task Test() - { - - } -} From e0b0b046227e96bfa56c31195105ed781014e535 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Wed, 1 Apr 2026 18:32:08 +0200 Subject: [PATCH 6/6] Fix tests --- .../Clients/SourceSchemaHttpClient.cs | 205 +++++--- .../SourceSchemaClientCapabilitiesTests.cs | 480 ------------------ .../Http/DefaultGraphQLHttpClientTests.cs | 243 ++++++++- 3 files changed, 374 insertions(+), 554 deletions(-) diff --git a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs index e46e4d6405c..a69b2c2916e 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs @@ -27,6 +27,7 @@ public sealed class SourceSchemaHttpClient : ISourceSchemaClient private readonly GraphQLHttpClient _client; private readonly SourceSchemaHttpClientConfiguration _configuration; + private readonly bool _supportsVariableBatching; private bool _disposed; /// @@ -44,7 +45,11 @@ public SourceSchemaHttpClient( _client = client; _configuration = configuration; - Capabilities = configuration.Capabilities; + var capabilities = configuration.Capabilities; + + Capabilities = capabilities; + + _supportsVariableBatching = capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching); } /// @@ -72,6 +77,7 @@ public async ValueTask ExecuteAsync( return new Response( context, _configuration, + _supportsVariableBatching, request.Node, request.OperationType, httpRequest.Uri ?? s_unknownUri, @@ -106,7 +112,11 @@ public IAsyncEnumerable ExecuteBatchStreamAsync( try { - var httpRequest = CreateHttpBatchRequest(context, requests, requiresFileUpload, ref buffer); + var httpRequest = CreateHttpBatchRequest( + context, + requests, + requiresFileUpload, + ref buffer); ConfigureCallbacks(httpRequest, context, requests[0].Node); var results = ExecuteBatchStreamAsync(requests, httpRequest, cancellationToken); @@ -133,71 +143,119 @@ private async IAsyncEnumerable ExecuteBatchStreamAsync( [EnumeratorCancellation] CancellationToken cancellationToken) { var httpResponse = await _client.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + bool? didFirstResultHaveRequestIndex = null; + var currentRequestIndex = 0; + var currentVariableIndex = 0; try { await foreach (var result in httpResponse.ReadAsResultStreamAsync().WithCancellation(cancellationToken)) { - var requestIndex = ResolveRequestIndex(requests, result); - - if (requestIndex == -1) + // Check if the first result has a requestIndex. + // If it does we can assume all others will have one as well and we know we need to check for it. + // If it doesn't we can assume there won't be one and we can just simple counters. + didFirstResultHaveRequestIndex ??= result.Root.TryGetProperty(RequestIndex, out _); + + // If we don't support variable batching, requests with multiple variables + // might have been flattened to multiple requests. + if (!_supportsVariableBatching) { - for (var i = 0; i < requests.Length; i++) + int requestIndex, variableIndex; + + if (didFirstResultHaveRequestIndex.Value) { - var req = requests[i]; + if (!result.Root.TryGetProperty(RequestIndex, out var flatRequestIndexElem)) + { + throw new InvalidOperationException( + "Expected requestIndex in batch response but it was missing."); + } - if (!TryGetResultPath(req, variableIndex: 0, out var p, out var ap)) + ResolveFlattenedIndex(requests, flatRequestIndexElem.GetInt32(), out requestIndex, out variableIndex); + } + else + { + requestIndex = currentRequestIndex; + variableIndex = currentVariableIndex; + + if (++currentVariableIndex >= Math.Max(1, requests[currentRequestIndex].Variables.Length)) { - continue; + currentRequestIndex++; + currentVariableIndex = 0; } + } + if (TryGetResultPath(requests[requestIndex], variableIndex, out var p, out var ap)) + { var ssr = ap.IsDefaultOrEmpty ? new SourceSchemaResult(p, result) : new SourceSchemaResult(p, result, additionalPaths: ap); - yield return new BatchStreamResult(i, ssr); + yield return new BatchStreamResult(requestIndex, ssr); } - - continue; } + else + { + var requestIndex = ResolveRequestIndex(requests, result); - var request = requests[requestIndex]; - var variableIndex = ResolveVariableIndex(request, result); + if (requestIndex == -1) + { + for (var i = 0; i < requests.Length; i++) + { + var req = requests[i]; - if (variableIndex == -1) - { - for (var vi = 0; vi < request.Variables.Length; vi++) + if (!TryGetResultPath(req, variableIndex: 0, out var p, out var ap)) + { + continue; + } + + var ssr = ap.IsDefaultOrEmpty + ? new SourceSchemaResult(p, result) + : new SourceSchemaResult(p, result, additionalPaths: ap); + + yield return new BatchStreamResult(i, ssr); + } + + continue; + } + + var request = requests[requestIndex]; + var variableIndex = ResolveVariableIndex(request, result); + + if (variableIndex == -1) { - if (!TryGetResultPath(request, vi, out var vp, out var vap)) + for (var vi = 0; vi < request.Variables.Length; vi++) { - continue; + if (!TryGetResultPath(request, vi, out var vp, out var vap)) + { + continue; + } + + var vssr = vap.IsDefaultOrEmpty + ? new SourceSchemaResult(vp, result) + : new SourceSchemaResult(vp, result, additionalPaths: vap); + + yield return new BatchStreamResult(requestIndex, vssr); } - var vssr = vap.IsDefaultOrEmpty - ? new SourceSchemaResult(vp, result) - : new SourceSchemaResult(vp, result, additionalPaths: vap); + continue; + } - yield return new BatchStreamResult(requestIndex, vssr); + if (!TryGetResultPath(request, variableIndex, out var path, out var additionalPaths)) + { + result.Dispose(); + throw new InvalidOperationException( + string.Format( + FusionExecutionResources.SourceSchemaHttpClient_InvalidVariableIndex, + variableIndex, + request.Node.Id)); } - continue; - } + var sourceSchemaResult = additionalPaths.IsDefaultOrEmpty + ? new SourceSchemaResult(path, result) + : new SourceSchemaResult(path, result, additionalPaths: additionalPaths); - if (!TryGetResultPath(request, variableIndex, out var path, out var additionalPaths)) - { - result.Dispose(); - throw new InvalidOperationException( - string.Format( - FusionExecutionResources.SourceSchemaHttpClient_InvalidVariableIndex, - variableIndex, - request.Node.Id)); + yield return new BatchStreamResult(requestIndex, sourceSchemaResult); } - - var sourceSchemaResult = additionalPaths.IsDefaultOrEmpty - ? new SourceSchemaResult(path, result) - : new SourceSchemaResult(path, result, additionalPaths: additionalPaths); - - yield return new BatchStreamResult(requestIndex, sourceSchemaResult); } } finally @@ -242,8 +300,7 @@ private GraphQLHttpRequest CreateHttpRequest( case 0: httpRequest = new GraphQLHttpRequest(CreateSingleRequest(context, originalRequest, ref buffer)) { - Uri = _configuration.BaseAddress, - AcceptHeaderValue = defaultAcceptHeader + Uri = _configuration.BaseAddress, AcceptHeaderValue = defaultAcceptHeader }; break; @@ -257,24 +314,26 @@ private GraphQLHttpRequest CreateHttpRequest( break; default: - if (!originalRequest.RequiresFileUpload - && _configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching)) + if (!originalRequest.RequiresFileUpload && _supportsVariableBatching) { - httpRequest = new GraphQLHttpRequest(CreateVariableBatchRequest(operationSourceText, originalRequest)) - { - Uri = _configuration.BaseAddress, - AcceptHeaderValue = _configuration.BatchingAcceptHeaderValue - }; + httpRequest = + new GraphQLHttpRequest(CreateVariableBatchRequest(operationSourceText, originalRequest)) + { + Uri = _configuration.BaseAddress, + AcceptHeaderValue = _configuration.BatchingAcceptHeaderValue + }; } else { - httpRequest = new GraphQLHttpRequest(CreateOperationBatchRequest(context, originalRequest, ref buffer)) - { - Uri = _configuration.BaseAddress, - AcceptHeaderValue = _configuration.BatchingAcceptHeaderValue, - EnableFileUploads = originalRequest.RequiresFileUpload - }; + httpRequest = + new GraphQLHttpRequest(CreateOperationBatchRequest(context, originalRequest, ref buffer)) + { + Uri = _configuration.BaseAddress, + AcceptHeaderValue = _configuration.BatchingAcceptHeaderValue, + EnableFileUploads = originalRequest.RequiresFileUpload + }; } + break; } @@ -346,6 +405,7 @@ private GraphQLHttpRequest CreateHttpBatchRequest( $"{i}.variables")); i++; } + break; } } @@ -361,12 +421,9 @@ private GraphQLHttpRequest CreateHttpBatchRequest( } else { - var supportsVariableBatching = - _configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching); - var capacity = originalRequests.Length; - if (!supportsVariableBatching) + if (!_supportsVariableBatching) { foreach (var sourceRequest in originalRequests) { @@ -388,7 +445,7 @@ private GraphQLHttpRequest CreateHttpBatchRequest( break; default: - if (supportsVariableBatching) + if (_supportsVariableBatching) { batchRequests.Add(CreateVariableBatchRequest( sourceRequest.OperationSourceText, sourceRequest)); @@ -406,6 +463,7 @@ private GraphQLHttpRequest CreateHttpBatchRequest( extensions: JsonSegment.Empty)); } } + break; } } @@ -581,6 +639,32 @@ private static int ResolveVariableIndex( throw ThrowHelper.VariableIndexOutOfRange(variableIndex); } + private static void ResolveFlattenedIndex( + ImmutableArray requests, + int flattenedIndex, + out int requestIndex, + out int variableIndex) + { + var remaining = flattenedIndex; + + for (var i = 0; i < requests.Length; i++) + { + var varCount = Math.Max(1, requests[i].Variables.Length); + + if (remaining < varCount) + { + requestIndex = i; + variableIndex = remaining; + return; + } + + remaining -= varCount; + } + + throw new InvalidOperationException( + $"Flattened index {flattenedIndex} is out of range."); + } + private static bool TryGetResultPath( SourceSchemaClientRequest request, int variableIndex, @@ -672,6 +756,7 @@ private static bool ContainsSubscriptionRequest( private sealed class Response( OperationPlanContext context, SourceSchemaHttpClientConfiguration configuration, + bool supportsVariableBatching, ExecutionNode node, OperationType operation, Uri uri, @@ -737,7 +822,7 @@ private async IAsyncEnumerable ReadAsResultStreamCoreAsync( { SourceSchemaResult? errorResult = null; - if (configuration.Capabilities.HasFlag(SourceSchemaClientCapabilities.VariableBatching)) + if (supportsVariableBatching) { await foreach (var result in response.ReadAsResultStreamAsync() .WithCancellation(cancellationToken)) diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs index 3c1898330d9..b1eab464719 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaClientCapabilitiesTests.cs @@ -586,486 +586,6 @@ public async Task OperationBatch_BatchRequest_OnlyRequestBatching_ServerReturnsJ #endregion -// [Fact] -// public async Task Fetch_With_ApolloRequestBatching_JsonLines() -// { -// // arrange -// using var server1 = CreateSourceSchema( -// "a", -// b => b.AddQueryType()); -// -// using var server2 = CreateSourceSchema( -// "b", -// b => b.AddQueryType(), -// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, -// batchingAcceptHeaderValues: [new("application/jsonl") { CharSet = "utf-8" }]); -// -// using var gateway = await CreateCompositeSchemaAsync( -// [ -// ("a", server1), -// ("b", server2) -// ]); -// -// // act -// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); -// -// var request = new OperationRequest( -// """ -// { -// books { -// author { -// id -// name -// } -// } -// } -// """); -// -// using var result = await client.PostAsync( -// request, -// new Uri("http://localhost:5000/graphql")); -// -// // assert -// await MatchSnapshotAsync(gateway, request, result); -// } -// -// [Fact] -// public async Task Fetch_With_ApolloRequestBatching_JsonLines_Large_Response() -// { -// // arrange -// using var server1 = CreateSourceSchema( -// "a", -// b => b.AddQueryType()); -// -// using var server2 = CreateSourceSchema( -// "b", -// b => b.AddQueryType(), -// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, -// batchingAcceptHeaderValues: [new("application/jsonl") { CharSet = "utf-8" }]); -// -// using var gateway = await CreateCompositeSchemaAsync( -// [ -// ("a", server1), -// ("b", server2) -// ]); -// -// // act -// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); -// -// var request = new OperationRequest( -// """ -// { -// books { -// author { -// id -// name(large: true) -// } -// } -// } -// """); -// -// using var result = await client.PostAsync( -// request, -// new Uri("http://localhost:5000/graphql")); -// -// // assert -// await MatchSnapshotAsync(gateway, request, result); -// } -// -// [Fact] -// public async Task Fetch_With_ApolloRequestBatching_SSE() -// { -// // arrange -// using var server1 = CreateSourceSchema( -// "a", -// b => b.AddQueryType()); -// -// using var server2 = CreateSourceSchema( -// "b", -// b => b.AddQueryType(), -// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, -// batchingAcceptHeaderValues: [new("text/event-stream") { CharSet = "utf-8" }]); -// -// using var gateway = await CreateCompositeSchemaAsync( -// [ -// ("a", server1), -// ("b", server2) -// ]); -// -// // act -// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); -// -// var request = new OperationRequest( -// """ -// { -// books { -// author { -// id -// name -// } -// } -// } -// """); -// -// using var result = await client.PostAsync( -// request, -// new Uri("http://localhost:5000/graphql")); -// -// // assert -// await MatchSnapshotAsync(gateway, request, result); -// } -// -// [Fact] -// public async Task Fetch_With_ApolloRequestBatching_SSE_Large_Response() -// { -// // arrange -// using var server1 = CreateSourceSchema( -// "a", -// b => b.AddQueryType()); -// -// using var server2 = CreateSourceSchema( -// "b", -// b => b.AddQueryType(), -// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, -// batchingAcceptHeaderValues: [new("text/event-stream") { CharSet = "utf-8" }]); -// -// using var gateway = await CreateCompositeSchemaAsync( -// [ -// ("a", server1), -// ("b", server2) -// ]); -// -// // act -// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); -// -// var request = new OperationRequest( -// """ -// { -// books { -// author { -// id -// name(large: true) -// } -// } -// } -// """); -// -// using var result = await client.PostAsync( -// request, -// new Uri("http://localhost:5000/graphql")); -// -// // assert -// await MatchSnapshotAsync(gateway, request, result); -// } -// -// [Fact] -// public async Task Fetch_With_ApolloRequestBatching_JsonArray() -// { -// // arrange -// using var server1 = CreateSourceSchema( -// "a", -// b => b.AddQueryType()); -// -// const string jsonArrayResponse = -// """ -// [ -// { -// "data": { -// "authorById": { -// "name": "Author 1" -// } -// } -// }, -// { -// "data": { -// "authorById": { -// "name": "Author 2" -// } -// } -// }, -// { -// "data": { -// "authorById": { -// "name": "Author 2" -// } -// } -// }, -// { -// "data": { -// "authorById": { -// "name": "Author 2" -// } -// } -// } -// ] -// """; -// -// using var server2 = CreateSourceSchema( -// "b", -// """ -// type Query { -// authorById(id: ID!): Author @lookup -// } -// -// type Author { -// id: ID! -// name: String! -// } -// """, -// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, -// httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); -// -// using var gateway = await CreateCompositeSchemaAsync( -// [ -// ("a", server1), -// ("b", server2) -// ]); -// -// // act -// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); -// -// var request = new OperationRequest( -// """ -// { -// books { -// author { -// id -// name -// } -// } -// } -// """); -// -// using var result = await client.PostAsync( -// request, -// new Uri("http://localhost:5000/graphql")); -// -// // assert -// await MatchSnapshotAsync(gateway, request, result); -// } -// -// [Fact] -// public async Task Fetch_With_Request_Batching_JsonArray_Large_Response() -// { -// // arrange -// using var server1 = CreateSourceSchema( -// "a", -// b => b.AddQueryType()); -// -// var jsonArrayResponse = -// $$""" -// [ -// { -// "data": { -// "authorById": { -// "name": "Author 1 {{GenerateRandomString(128)}}" -// } -// } -// }, -// { -// "data": { -// "authorById": { -// "name": "Author 2 {{GenerateRandomString(128)}}" -// } -// } -// }, -// { -// "data": { -// "authorById": { -// "name": "Author 2 {{GenerateRandomString(128)}}" -// } -// } -// }, -// { -// "data": { -// "authorById": { -// "name": "Author 2 {{GenerateRandomString(128)}}" -// } -// } -// } -// ] -// """; -// -// using var server2 = CreateSourceSchema( -// "b", -// """ -// type Query { -// authorById(id: ID!): Author @lookup -// } -// -// type Author { -// id: ID! -// name: String! -// } -// """, -// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, -// httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); -// -// using var gateway = await CreateCompositeSchemaAsync( -// [ -// ("a", server1), -// ("b", server2) -// ]); -// -// // act -// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); -// -// var request = new OperationRequest( -// """ -// { -// books { -// author { -// id -// name -// } -// } -// } -// """); -// -// using var result = await client.PostAsync( -// request, -// new Uri("http://localhost:5000/graphql")); -// -// // assert -// await MatchSnapshotAsync(gateway, request, result); -// } -// -// [Fact(Skip = "The Gateway needs to produce errors for this")] -// public async Task Fetch_With_Request_Batching_JsonArray_Returns_Wrong_Number_Of_Items() -// { -// // arrange -// using var server1 = CreateSourceSchema( -// "a", -// b => b.AddQueryType()); -// -// // this contains just 2 entries, while it should contain 4. -// const string jsonArrayResponse = -// """ -// [ -// { -// "data": { -// "authorById": { -// "name": "Author 1" -// } -// } -// }, -// { -// "data": { -// "authorById": { -// "name": "Author 2" -// } -// } -// } -// ] -// """; -// -// using var server2 = CreateSourceSchema( -// "b", -// """ -// type Query { -// authorById(id: ID!): Author @lookup -// } -// -// type Author { -// id: ID! -// name: String! -// } -// """, -// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, -// httpClient: new HttpClient(new MockHttpMessageHandler(jsonArrayResponse))); -// -// using var gateway = await CreateCompositeSchemaAsync( -// [ -// ("a", server1), -// ("b", server2) -// ]); -// -// // act -// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); -// -// var request = new OperationRequest( -// """ -// { -// books { -// author { -// id -// name -// } -// } -// } -// """); -// -// using var result = await client.PostAsync( -// request, -// new Uri("http://localhost:5000/graphql")); -// -// // assert -// await MatchSnapshotAsync(gateway, request, result); -// } -// -// [Fact(Skip = "The Gateway needs to produce errors for this")] -// public async Task Fetch_With_Request_Batching_JsonArray_Returns_Singular_Response() -// { -// // arrange -// using var server1 = CreateSourceSchema( -// "a", -// b => b.AddQueryType()); -// -// const string jsonResponse = -// """ -// { -// "data": { -// "authorById": { -// "name": "Author 1" -// } -// } -// } -// """; -// -// using var server2 = CreateSourceSchema( -// "b", -// """ -// type Query { -// authorById(id: ID!): Author @lookup -// } -// -// type Author { -// id: ID! -// name: String! -// } -// """, -// capabilities: SourceSchemaClientCapabilities.ApolloRequestBatching, -// httpClient: new HttpClient(new MockHttpMessageHandler(jsonResponse))); -// -// using var gateway = await CreateCompositeSchemaAsync( -// [ -// ("a", server1), -// ("b", server2) -// ]); -// -// // act -// using var client = GraphQLHttpClient.Create(gateway.CreateClient()); -// -// var request = new OperationRequest( -// """ -// { -// books { -// author { -// id -// name -// } -// } -// } -// """); -// -// using var result = await client.PostAsync( -// request, -// new Uri("http://localhost:5000/graphql")); -// -// // assert -// await MatchSnapshotAsync(gateway, request, result); -// } - private static string GenerateRandomString(int kiloBytes) { var targetBytes = kiloBytes * 1024; diff --git a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs index 47c2ba95a17..a694cce19f8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs @@ -7,6 +7,8 @@ namespace HotChocolate.Fusion.Transport.Http; public class DefaultGraphQLHttpClientTests { + private const int LargeTestBatchSize = 5_000; + [Fact] public async Task Fetch_Large_Json() { @@ -16,7 +18,8 @@ public async Task Fetch_Large_Json() await using var app = context.Item2; using var client = new DefaultGraphQLHttpClient(server.CreateClient(), disposeInnerClient: true); - var operationRequest = new OperationRequest("{ items }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var operationRequest = + new OperationRequest("{ items }", null, null, null, VariableValues.Empty, JsonSegment.Empty); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -45,7 +48,8 @@ public async Task ReadAsResult_Application_GraphQL_Response_Json_Response() "application/graphql-response+json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var operationRequest = + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -73,7 +77,8 @@ public async Task ReadAsResult_Application_Json_Response() "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var operationRequest = + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -101,7 +106,8 @@ public async Task ReadAsResultStream_Single_Application_GraphQL_Response_Json_Re "application/graphql-response+json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var operationRequest = + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -138,7 +144,8 @@ public async Task ReadAsResultStream_Single_Application_Json_Response() "application/json"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var operationRequest = + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -161,7 +168,7 @@ public async Task ReadAsResultStream_Single_Application_Json_Response() } [Fact] - public async Task ReadAsResultStream_Single_Application_Json_Apollo_Request_Batching_Response() + public async Task ReadAsResultStream_Single_Application_Json_ApolloRequestBatching_Response() { // arrange var handler = new MockHttpMessageHandler( @@ -203,7 +210,7 @@ public async Task ReadAsResultStream_Single_Application_Json_Apollo_Request_Batc } [Fact] - public async Task ReadAsResultStream_Multi_Application_Json_Apollo_Request_Batching_Response() + public async Task ReadAsResultStream_Multi_Application_Json_ApolloRequestBatching_Response() { // arrange var handler = new MockHttpMessageHandler( @@ -225,10 +232,10 @@ public async Task ReadAsResultStream_Multi_Application_Json_Apollo_Request_Batch using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); var operationRequest = new OperationBatchRequest( - [ - new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty), - new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty) - ]); + [ + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty), + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty) + ]); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -362,7 +369,8 @@ public async Task ReadAsResultStream_Single_Text_Event_Stream_Response() "text/event-stream"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var operationRequest = + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -411,7 +419,8 @@ public async Task ReadAsResultStream_Multi_Text_Event_Stream_Response() "text/event-stream"); using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); - var operationRequest = new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var operationRequest = + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); // act @@ -433,6 +442,173 @@ public async Task ReadAsResultStream_Multi_Text_Event_Stream_Response() Assert.Equal(2, count); } + [Fact] + public async Task ReadAsResult_Large_Application_Json_Response() + { + // arrange + var largeJson = GenerateLargeJsonResponse(5000); + var handler = new MockHttpMessageHandler(largeJson, "application/json"); + using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); + + var operationRequest = + new OperationRequest("{ items }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); + + // act + using var result = await client.SendAsync(request); + var document = await result.ReadAsResultAsync(); + + // assert + var itemCount = document.Root.GetProperty("data").GetProperty("items").GetArrayLength(); + Assert.Equal(5000, itemCount); + } + + [Fact] + public async Task ReadAsResult_Large_Application_Graphql_Response_Json_Response() + { + // arrange + var largeJson = GenerateLargeJsonResponse(5000); + var handler = new MockHttpMessageHandler(largeJson, "application/graphql-response+json"); + using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); + + var operationRequest = + new OperationRequest("{ items }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); + + // act + using var result = await client.SendAsync(request); + var document = await result.ReadAsResultAsync(); + + // assert + var itemCount = document.Root.GetProperty("data").GetProperty("items").GetArrayLength(); + Assert.Equal(5000, itemCount); + } + + [Fact] + public async Task ReadAsResultStream_Large_Application_Json_Lines_Response() + { + // arrange + var ms = new MemoryStream(); + var sw = new StreamWriter(ms); + + for (int i = 0; i < 1000; i++) + { + sw.Write($"{{\"data\":{{\"number\":{i}}}}}"); + sw.Write('\n'); + } + + sw.Flush(); + ms.Position = 0; + + var handler = new MockHttpMessageHandler(ms, "application/jsonl"); + using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); + + var operationRequest = new VariableBatchRequest( + "{ number }", + null, + null, + null, + [..Enumerable.Repeat(VariableValues.Empty, 1000)], + JsonSegment.Empty); + var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); + + // act + using var result = await client.SendAsync(request); + var stream = result.ReadAsResultStreamAsync(); + + // assert + var count = 0; + + await foreach (var document in stream) + { + var number = document.Root.GetProperty("data").GetProperty("number").GetInt32(); + Assert.Equal(count, number); + count++; + } + + Assert.Equal(1000, count); + } + + [Fact] + public async Task ReadAsResultStream_Large_Application_Json_Array_Response() + { + // arrange + var largeJson = GenerateLargeJsonArrayResponse(LargeTestBatchSize); + var handler = new MockHttpMessageHandler(largeJson, "application/json"); + using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); + + var operationRequest = new OperationBatchRequest( + [ + ..Enumerable.Range(0, LargeTestBatchSize) + .Select(_ => + (IOperationRequest)new OperationRequest("{ number }", null, null, null, VariableValues.Empty, + JsonSegment.Empty)) + ]); + var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); + + // act + using var result = await client.SendAsync(request); + var stream = result.ReadAsResultStreamAsync(); + + // assert + var count = 0; + + await foreach (var document in stream) + { + var number = document.Root.GetProperty("data").GetProperty("number").GetInt32(); + Assert.Equal(count, number); + count++; + } + + Assert.Equal(LargeTestBatchSize, count); + } + + [Fact] + public async Task ReadAsResultStream_Large_Text_Event_Stream_Response() + { + // arrange + var ms = new MemoryStream(); + var sw = new StreamWriter(ms); + + for (int i = 0; i < LargeTestBatchSize; i++) + { + sw.Write("event: next"); + sw.Write('\n'); + sw.Write($"data: {{\"data\":{{\"number\":{i}}}}}"); + sw.Write('\n'); + sw.Write('\n'); + } + + sw.Write("event: complete"); + sw.Write('\n'); + sw.Write('\n'); + sw.Flush(); + ms.Position = 0; + + var handler = new MockHttpMessageHandler(ms, "text/event-stream"); + using var client = new DefaultGraphQLHttpClient(new HttpClient(handler)); + + var operationRequest = + new OperationRequest("{ number }", null, null, null, VariableValues.Empty, JsonSegment.Empty); + var request = new GraphQLHttpRequest(operationRequest, new Uri("http://localhost:5000/graphql")); + + // act + using var result = await client.SendAsync(request); + var stream = result.ReadAsResultStreamAsync(); + + // assert + var count = 0; + + await foreach (var document in stream) + { + var number = document.Root.GetProperty("data").GetProperty("number").GetInt32(); + Assert.Equal(count, number); + count++; + } + + Assert.Equal(LargeTestBatchSize, count); + } + [Fact] public async Task Post_Variables_Do_Not_Escape_Apostrophe_To_Unicode() { @@ -485,11 +661,50 @@ public async Task Post_Variables_Do_Not_Escape_Apostrophe_To_Unicode() Assert.Equal(description, serializedDescription); } + private static string GenerateLargeJsonResponse(int itemCount) + { + var sb = new StringBuilder(); + sb.Append("{\"data\":{\"items\":["); + + for (int i = 0; i < itemCount; i++) + { + if (i > 0) + { + sb.Append(','); + } + + sb.Append($"{{\"id\":{i},\"value\":\"item_{i}\"}}"); + } + + sb.Append("]}}"); + return sb.ToString(); + } + + private static string GenerateLargeJsonArrayResponse(int itemCount) + { + var sb = new StringBuilder(); + sb.Append('['); + + for (int i = 0; i < itemCount; i++) + { + if (i > 0) + { + sb.Append(','); + } + + sb.Append($"{{\"data\":{{\"number\":{i}}}}}"); + } + + sb.Append(']'); + return sb.ToString(); + } + private static VariableValues CreateVariableValues(Dictionary variables) { var writer = new ChunkedArrayWriter(); var startPosition = writer.Position; - using var jsonWriter = new Utf8JsonWriter(writer, new JsonWriterOptions { Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping }); + using var jsonWriter = new Utf8JsonWriter(writer, + new JsonWriterOptions { Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping }); JsonSerializer.Serialize(jsonWriter, variables); jsonWriter.Flush(); var length = writer.Position - startPosition;