From 95580c3ea99df3a1d7215d40532474629f94c50c Mon Sep 17 00:00:00 2001 From: Glen Date: Mon, 13 Apr 2026 12:53:51 +0200 Subject: [PATCH 1/5] [Fusion] Do not apply "InferKeysFromLookups" to invalid lookup fields --- .../SourceSchemaPreprocessor.cs | 10 ++++- .../SourceSchemaPreprocessorTests.cs | 38 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/HotChocolate/Fusion/src/Fusion.Composition/SourceSchemaPreprocessor.cs b/src/HotChocolate/Fusion/src/Fusion.Composition/SourceSchemaPreprocessor.cs index 45a1da421f8..e46ae94cc46 100644 --- a/src/HotChocolate/Fusion/src/Fusion.Composition/SourceSchemaPreprocessor.cs +++ b/src/HotChocolate/Fusion/src/Fusion.Composition/SourceSchemaPreprocessor.cs @@ -388,7 +388,15 @@ private void InferKeysFromLookups() var lookupFieldDefinitions = schema.Types .OfType() - .SelectMany(t => t.Fields.AsEnumerable().Where(f => f.Directives.ContainsName(Lookup))); + .SelectMany(t => t.Fields.AsEnumerable().Where(f => + { + if (f.Arguments.Count == 0 || f.Type.IsNonNullType() || f.Type.IsListType()) + { + return false; + } + + return f.Directives.ContainsName(Lookup); + })); foreach (var lookupFieldDefinition in lookupFieldDefinitions) { diff --git a/src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs b/src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs index 15fdb1c6cf5..5446d014c74 100644 --- a/src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs @@ -359,6 +359,44 @@ type Person { Assert.False(schema.Types["Person"].Directives.ContainsName(WellKnownDirectiveNames.Key)); } + [Fact] + public void Preprocess_InferKeysFromLookups_DoesNotApplyToInvalidLookups() + { + // arrange + var sourceSchemaText = + new SourceSchemaText( + "A", + """ + type Query { + personById(id1: ID!): Person @lookup + personByIdNoArguments: Person @lookup + personByIdNonNull(id2: ID!): Person! @lookup + personByIdListType(id3: ID!): [Person] @lookup + } + + type Person { + id: ID! + } + """); + var compositionLog = new CompositionLog(); + var sourceSchemaParser = new SourceSchemaParser(sourceSchemaText, compositionLog); + var schema = sourceSchemaParser.Parse().Value; + var preprocessor = + new SourceSchemaPreprocessor( + schema, + [], + compositionLog); + + // act + var result = preprocessor.Preprocess(); + + // assert + Assert.True(result.IsSuccess); + Assert.Single( + schema.Types["Person"].Directives.Where( + d => d.Name == WellKnownDirectiveNames.Key).ToArray()); + } + [Fact] public void Preprocess_InheritInterfaceKeysEnabled_InheritsInterfaceKeys() { From b83a9aa4eb29cfa3f0bbdcadbb162ced10c0c654 Mon Sep 17 00:00:00 2001 From: Glen Date: Mon, 13 Apr 2026 13:53:52 +0200 Subject: [PATCH 2/5] Address Copilot feedback --- .../SourceSchemaPreprocessorTests.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs b/src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs index 5446d014c74..47c90dc76b9 100644 --- a/src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs @@ -375,7 +375,9 @@ type Query { } type Person { - id: ID! + id1: ID! + id2: ID! + id3: ID! } """); var compositionLog = new CompositionLog(); @@ -392,9 +394,9 @@ type Person { // assert Assert.True(result.IsSuccess); - Assert.Single( - schema.Types["Person"].Directives.Where( - d => d.Name == WellKnownDirectiveNames.Key).ToArray()); + var keyDirective = + Assert.Single(schema.Types["Person"].Directives, d => d.Name == WellKnownDirectiveNames.Key); + Assert.Equal("id1", keyDirective.Arguments["fields"].Value); } [Fact] From ba29b1ebf3125f6f160998c5e0d33b7011e214a5 Mon Sep 17 00:00:00 2001 From: Glen Date: Mon, 13 Apr 2026 14:50:32 +0200 Subject: [PATCH 3/5] Fix tests --- .../test/Fusion.AspNetCore.Tests/AbstractTypeTests.cs | 4 ++-- .../Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs | 6 +++--- .../Fusion.AspNetCore.Tests/DiagnisticListenerTests.cs | 6 +++--- .../test/Fusion.AspNetCore.Tests/InaccessibleTests.cs | 4 ++-- .../test/Fusion.AspNetCore.Tests/IntrospectionTests.cs | 4 ++-- .../test/Fusion.AspNetCore.Tests/K6ExecutionTests.cs | 4 ++-- .../Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs | 4 ++-- .../Fusion/test/Fusion.AspNetCore.Tests/MutationTests.cs | 2 +- .../OperationPlannerInterceptorTests.cs | 6 +++--- .../Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs | 4 ++-- .../SubscriptionsOverHttpStoreTests.cs | 2 +- ...tractTypeTests.Abstract_Type_With_Abstract_Lookup.yaml | 4 ++-- ...tractTypeTests.Abstract_Type_With_Concrete_Lookup.yaml | 4 ++-- ...tractTypeTests.Concrete_Type_With_Abstract_Lookup.yaml | 4 ++-- ...ookStoreTests.Ensure_String_Literals_Can_Be_Empty.yaml | 6 +++--- ...okStoreTests.Ensure_String_Variables_Can_Be_Empty.yaml | 6 +++--- .../BookStoreTests.Fetch_Book_From_SourceSchema1.yaml | 6 +++--- ..._From_SourceSchema1_And_Author_From_SourceSchema2.yaml | 6 +++--- ...eTests.Fetch_Book_From_SourceSchema1_Two_Requests.yaml | 6 +++--- ...Tests.Fetch_Book_From_SourceSchema1_With_Settings.yaml | 6 +++--- ...From_SourceSchema1_And_Authors_From_SourceSchema2.yaml | 6 +++--- ...ts.Fetch_Books_With_Requirements_To_SourceSchema1.yaml | 6 +++--- ...ks_With_Requirements_To_SourceSchema1_Three_Times.yaml | 6 +++--- ..._Books_With_Requirements_To_SourceSchema1_X_Times.yaml | 6 +++--- ...ts.Fetch_Books_With_Variable_First_And_First_Is_1.yaml | 6 +++--- ...Fetch_Books_With_Variable_First_And_First_Omitted.yaml | 6 +++--- ..._Variable_First_Last_And_First_1_And_Last_Omitted.yaml | 6 +++--- ..._Inaccessible_Value_When_Accessible_Value_Is_Used.yaml | 4 ++-- ...naccessible_Value_When_Inaccessible_Value_Is_Used.yaml | 4 ++-- ...s.Field_With_Inaccessible_Argument_Can_Be_Queried.yaml | 4 ++-- ...ld_With_Inaccessible_Argument_Cannot_Be_Passed_In.yaml | 4 ++-- ....Inaccessible_Argument_Not_In_Field_Introspection.yaml | 4 ++-- ...Inaccessible_Enum_Value_Not_In_Enum_Introspection.yaml | 4 ++-- ...s.Inaccessible_Fields_Can_Be_Used_As_Requirements.yaml | 4 ++-- ...ssibleTests.Inaccessible_Fields_Cannot_Be_Queried.yaml | 4 ++-- ...ssible_Fields_Cannot_Be_Queried_Via_Introspection.yaml | 4 ++-- ...ble_Input_Field_Not_In_Input_Object_Introspection.yaml | 4 ++-- ...naccessible_Field_When_Accessible_Field_Is_Passed.yaml | 4 ++-- ...sible_Field_When_Inaccessible_Field_Is_Not_Passed.yaml | 4 ++-- .../IntrospectionTests.Download_Schema.graphql | 2 +- .../IntrospectionTests.Fetch_Schema_Types_Name.yaml | 4 ++-- .../IntrospectionTests.Fetch_Specific_Type.yaml | 4 ++-- .../IntrospectionTests.Typename_On_Object.yaml | 4 ++-- .../IntrospectionTests.Typename_On_Object_With_Alias.yaml | 4 ++-- .../IntrospectionTests.Typename_On_Query.yaml | 4 ++-- .../IntrospectionTests.Typename_On_Query_Skip_False.yaml | 4 ++-- .../IntrospectionTests.Typename_On_Query_Skip_True.yaml | 4 ++-- .../IntrospectionTests.Typename_On_Query_With_Alias.yaml | 4 ++-- .../LookupTests.Fetch_From_Nested_Internal_Lookup.yaml | 2 +- .../LookupTests.Fetch_OneOf_Lookup_With_Id.yaml | 2 +- .../LookupTests.Fetch_OneOf_Lookup_With_Name.yaml | 2 +- .../__snapshots__/MutationTests.Multiple_Mutation.yaml | 2 +- .../__snapshots__/MutationTests.Single_Mutation.yaml | 2 +- ...r_With_Path_For_Lookup_Field_NonNull_OnError_Null.yaml | 6 ++++-- ...h_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml | 6 ++++-- ...or_With_Path_For_Lookup_Leaf_NonNull_OnError_Null.yaml | 6 ++++-- ...th_Path_For_Lookup_Leaf_NonNull_OnError_Propagate.yaml | 6 ++++-- .../SubscriptionsOverHttpStoreTests.Subscribe_Simple.yaml | 2 +- .../Fusion/test/Fusion.Execution.Tests/FusionTestBase.cs | 8 ++++---- .../Fusion.Execution.Tests/Planning/RequirementTests.cs | 4 ++-- .../__resources__/k6-reviews.graphqls | 4 ++-- .../invalid-example-1/source-schema-1.graphqls | 2 +- .../invalid-example-1/source-schema-2.graphqls | 2 +- 63 files changed, 141 insertions(+), 133 deletions(-) diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/AbstractTypeTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/AbstractTypeTests.cs index 50efba150c3..2a500c1b8dd 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/AbstractTypeTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/AbstractTypeTests.cs @@ -1272,7 +1272,7 @@ public IEnumerable InterfaceConnection() => [new Discussion(1)]; [Lookup] - public Author GetAuthorById(int id) => new Author(id); + public Author? GetAuthorById(int id) => new Author(id); } [InterfaceType] @@ -1300,7 +1300,7 @@ public static class SourceSchema2 public class Query { [Lookup] - public OtherInterface GetOtherInterface(int id) + public OtherInterface? GetOtherInterface(int id) => new Author(id, id * 5); [Lookup] diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs index a1974fd2648..816268c50bd 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/BookStoreTests.cs @@ -629,7 +629,7 @@ public class Query }; [Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) => _books[id]; [UsePaging] @@ -684,12 +684,12 @@ public Query() [Internal] [Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) => _books[id]; [Internal] [Lookup] - public Author GetAuthorById(int id) + public Author? GetAuthorById(int id) => _authors[id]; [UsePaging] diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/DiagnisticListenerTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/DiagnisticListenerTests.cs index 2bbc2c4d210..02d4e2900ea 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/DiagnisticListenerTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/DiagnisticListenerTests.cs @@ -80,7 +80,7 @@ public class Query }; [Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) => _books[id]; [UsePaging] @@ -128,12 +128,12 @@ public Query() [Internal] [Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) => _books[id]; [Internal] [Lookup] - public Author GetAuthorById(int id) + public Author? GetAuthorById(int id) => _authors[id]; [UsePaging] diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/InaccessibleTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/InaccessibleTests.cs index fbdfe991651..1caf7b23504 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/InaccessibleTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/InaccessibleTests.cs @@ -916,7 +916,7 @@ public class Query }; [Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) => _books[id]; public string GetInaccessibleText( @@ -943,7 +943,7 @@ public class Query [Internal] [Lookup] - public Author GetAuthorById(int id) + public Author? GetAuthorById(int id) => _authors[id]; public SomeEnum GetEnumField(SomeEnum value) diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/IntrospectionTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/IntrospectionTests.cs index 4a0c06a13b2..ce21f3dabc8 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/IntrospectionTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/IntrospectionTests.cs @@ -539,7 +539,7 @@ public class Query }; [Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) => _books[id]; [UsePaging] @@ -578,7 +578,7 @@ public class Query [Internal] [Lookup] - public Author GetAuthorById(int id) + public Author? GetAuthorById(int id) => _authors[id]; [UsePaging] diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/K6ExecutionTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/K6ExecutionTests.cs index 856dbacfa11..689d9099fa9 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/K6ExecutionTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/K6ExecutionTests.cs @@ -178,11 +178,11 @@ public sealed class ReviewsQuery => ReviewRepository.GetById(id); [Lookup, Internal] - public ReviewProduct GetProduct([ID] string upc) + public ReviewProduct? GetProduct([ID] string upc) => new() { Upc = upc }; [Lookup, Internal] - public ReviewUser GetUser([ID] string id) + public ReviewUser? GetUser([ID] string id) => new() { Id = id }; } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs index 9d0f3cdb443..86e302209a0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/LookupTests.cs @@ -184,7 +184,7 @@ public class InternalLookups }; [Lookup] - public Author GetAuthorById([ID] int id) + public Author? GetAuthorById([ID] int id) => _authors[id]; } @@ -241,7 +241,7 @@ public class InternalLookups }; [Lookup, Internal] - public Author GetAuthor([Is("{ id } | { name }")] AuthorByInput by) + public Author? GetAuthor([Is("{ id } | { name }")] AuthorByInput by) { if (by.Id is not null) { diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/MutationTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/MutationTests.cs index 0a951d64e09..f0a48667faf 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/MutationTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/MutationTests.cs @@ -126,7 +126,7 @@ public static class SourceSchema2 public class Query { [Internal, Lookup] - public Book GetBookById(int id) => new(id, "Abc"); + public Book? GetBookById(int id) => new(id, "Abc"); } public record Book(int Id, string Author); diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/OperationPlannerInterceptorTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/OperationPlannerInterceptorTests.cs index 93de7bc293e..6d40a763edb 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/OperationPlannerInterceptorTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/OperationPlannerInterceptorTests.cs @@ -134,7 +134,7 @@ public class Query }; [Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) => _books[id]; [UsePaging] @@ -182,12 +182,12 @@ public Query() [Internal] [Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) => _books[id]; [Internal] [Lookup] - public Author GetAuthorById(int id) + public Author? GetAuthorById(int id) => _authors[id]; [UsePaging] diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs index f0d4efd1e20..1b9a1b633a3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs @@ -993,7 +993,7 @@ public static class SourceSchema4 public class Query { [Lookup] - public Product GetProductById(int id, IResolverContext context) + public Product? GetProductById(int id, IResolverContext context) => throw new GraphQLException(ErrorBuilder.New().SetMessage("Could not resolve Product") .SetPath(context.Path).Build()); } @@ -1023,7 +1023,7 @@ public static class SourceSchema6 public class Query { [Lookup] - public Product GetProductById(int id) => new(id); + public Product? GetProductById(int id) => new(id); } public record Product(int Id) diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SubscriptionsOverHttpStoreTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SubscriptionsOverHttpStoreTests.cs index 994384f20c6..44ecf44bed1 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SubscriptionsOverHttpStoreTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SubscriptionsOverHttpStoreTests.cs @@ -85,7 +85,7 @@ public record Book(int Id, string Title); public class Query { [Internal, Lookup] - public Book GetBookById(int id) + public Book? GetBookById(int id) { switch (id) { 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 be5a3897b84..4c9a3ade5b5 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 @@ -90,7 +90,7 @@ sourceSchemas: "Returns the elements in the list that come before the specified cursor." before: String ): InterfaceConnectionConnection - authorById(id: Int!): Author! @lookup + authorById(id: Int!): Author @lookup } interactions: - request: @@ -139,7 +139,7 @@ sourceSchemas: } type Query { - otherInterface(id: Int!): OtherInterface! @lookup + otherInterface(id: Int!): OtherInterface @lookup discussionById(id: ID!): Discussion @lookup @internal } interactions: 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 6397c6d7b65..be90c2f8474 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 @@ -90,7 +90,7 @@ sourceSchemas: "Returns the elements in the list that come before the specified cursor." before: String ): InterfaceConnectionConnection - authorById(id: Int!): Author! @lookup + authorById(id: Int!): Author @lookup } interactions: - request: @@ -139,7 +139,7 @@ sourceSchemas: } type Query { - otherInterface(id: Int!): OtherInterface! @lookup + otherInterface(id: Int!): OtherInterface @lookup discussionById(id: ID!): Discussion @lookup @internal } interactions: 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 31d9ee53fdd..1ac5d1ecca0 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 @@ -86,7 +86,7 @@ sourceSchemas: "Returns the elements in the list that come before the specified cursor." before: String ): InterfaceConnectionConnection - authorById(id: Int!): Author! @lookup + authorById(id: Int!): Author @lookup } interactions: - request: @@ -130,7 +130,7 @@ sourceSchemas: } type Query { - otherInterface(id: Int!): OtherInterface! @lookup + otherInterface(id: Int!): OtherInterface @lookup discussionById(id: ID!): Discussion @lookup @internal } interactions: 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 2de13be9218..8cdf63ff05c 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 @@ -59,7 +59,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -136,8 +136,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int 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 9c85532167c..2ec7e2ddec4 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 @@ -63,7 +63,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -144,8 +144,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int 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 9adf01c7579..748c5b1ec44 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 @@ -65,7 +65,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -148,8 +148,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int 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 d3b2be368e9..0357d699b41 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 @@ -69,7 +69,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -156,8 +156,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: 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 098cb7574dd..d4474293924 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 @@ -65,7 +65,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -148,8 +148,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_With_Settings.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_With_Settings.yaml index ea272ebbbac..5734c02b0d3 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_With_Settings.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/BookStoreTests.Fetch_Book_From_SourceSchema1_With_Settings.yaml @@ -65,7 +65,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -127,8 +127,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int 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 54879577b31..bc409898494 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 @@ -98,7 +98,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -214,8 +214,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: 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 d259ada945e..e6a3048c570 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 @@ -78,7 +78,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -179,8 +179,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: 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 9980c1ca3ee..bd420b59ef0 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 @@ -78,7 +78,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -179,8 +179,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: 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 b40a2e84aea..59a53ac9f67 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 @@ -78,7 +78,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -179,8 +179,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: 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 dd9461b8b96..4f55bf84f4a 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 @@ -81,7 +81,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -180,8 +180,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: 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 c7155b608f9..2c531b80c0f 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 @@ -100,7 +100,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -218,8 +218,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: 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 c7e2c9f4d91..6204a4fdb96 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 @@ -81,7 +81,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -180,8 +180,8 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup - authorById(id: Int!): Author! @internal @lookup + bookById(id: Int!): Book @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int 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 cec32ab5c82..198f49e98c9 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 @@ -29,7 +29,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -45,7 +45,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Enum_With_Inaccessible_Value_When_Inaccessible_Value_Is_Used.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Enum_With_Inaccessible_Value_When_Inaccessible_Value_Is_Used.yaml index afc499153d7..a668b16174e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Enum_With_Inaccessible_Value_When_Inaccessible_Value_Is_Used.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Enum_With_Inaccessible_Value_When_Inaccessible_Value_Is_Used.yaml @@ -46,7 +46,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -62,7 +62,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } 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 a4621a28f06..748e4ed185a 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 @@ -29,7 +29,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -60,7 +60,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Field_With_Inaccessible_Argument_Cannot_Be_Passed_In.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Field_With_Inaccessible_Argument_Cannot_Be_Passed_In.yaml index 3e414f8df9a..e6386bbabe4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Field_With_Inaccessible_Argument_Cannot_Be_Passed_In.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Field_With_Inaccessible_Argument_Cannot_Be_Passed_In.yaml @@ -43,7 +43,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -59,7 +59,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Argument_Not_In_Field_Introspection.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Argument_Not_In_Field_Introspection.yaml index 6a1b1b3d317..5f80011de1e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Argument_Not_In_Field_Introspection.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Argument_Not_In_Field_Introspection.yaml @@ -71,7 +71,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -87,7 +87,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Enum_Value_Not_In_Enum_Introspection.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Enum_Value_Not_In_Enum_Introspection.yaml index a86073a7ce1..bb76db196d4 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Enum_Value_Not_In_Enum_Introspection.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Enum_Value_Not_In_Enum_Introspection.yaml @@ -39,7 +39,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -55,7 +55,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } 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 5a1235c853c..04be273c75e 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 @@ -37,7 +37,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -76,7 +76,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Cannot_Be_Queried.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Cannot_Be_Queried.yaml index 2c26a544a5e..7d7759d5c03 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Cannot_Be_Queried.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Cannot_Be_Queried.yaml @@ -47,7 +47,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -63,7 +63,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Cannot_Be_Queried_Via_Introspection.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Cannot_Be_Queried_Via_Introspection.yaml index 097e263b4f7..020051df325 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Cannot_Be_Queried_Via_Introspection.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Fields_Cannot_Be_Queried_Via_Introspection.yaml @@ -39,7 +39,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -55,7 +55,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Input_Field_Not_In_Input_Object_Introspection.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Input_Field_Not_In_Input_Object_Introspection.yaml index 1682c3f4169..03c1ffed14e 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Input_Field_Not_In_Input_Object_Introspection.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Inaccessible_Input_Field_Not_In_Input_Object_Introspection.yaml @@ -39,7 +39,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -55,7 +55,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } 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 83c3ddfe1c5..354a3220d7b 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 @@ -29,7 +29,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -45,7 +45,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Input_With_Inaccessible_Field_When_Inaccessible_Field_Is_Not_Passed.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Input_With_Inaccessible_Field_When_Inaccessible_Field_Is_Not_Passed.yaml index e4cbc1445d2..a7e5e56bd64 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Input_With_Inaccessible_Field_When_Inaccessible_Field_Is_Not_Passed.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/InaccessibleTests.Input_With_Inaccessible_Field_When_Inaccessible_Field_Is_Not_Passed.yaml @@ -44,7 +44,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup inaccessibleText(text: String! = "This is the default!" @inaccessible): String! books: [Book!]! } @@ -60,7 +60,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup enumField(value: SomeEnum!): SomeEnum! shareable(input: SomeInput!): String! } diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Download_Schema.graphql b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Download_Schema.graphql index ecb694a4793..e0985da6cff 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Download_Schema.graphql +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Download_Schema.graphql @@ -13,7 +13,7 @@ type Query { "Returns the last _n_ elements from the list." last: Int ): AuthorsConnection - bookById(id: Int!): Book! + bookById(id: Int!): Book books( "Returns the elements in the list that come after the specified cursor." after: String diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Schema_Types_Name.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Schema_Types_Name.yaml index 0c8283f742f..634b56bd4fb 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Schema_Types_Name.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Schema_Types_Name.yaml @@ -123,7 +123,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -183,7 +183,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Specific_Type.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Specific_Type.yaml index 5a266e80d84..b3b64a1e407 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Specific_Type.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Specific_Type.yaml @@ -63,7 +63,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -123,7 +123,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int 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 5ff1703bf62..21db13f6c2e 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 @@ -78,7 +78,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -172,7 +172,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int 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 1ccdcaaddca..d6375eed362 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 @@ -78,7 +78,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -172,7 +172,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query.yaml index cc6405dde42..3384f25d273 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query.yaml @@ -59,7 +59,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -119,7 +119,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_False.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_False.yaml index ac7fcfa44e3..a1e277e3654 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_False.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_False.yaml @@ -59,7 +59,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -119,7 +119,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_True.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_True.yaml index 82f432b7d54..da5bc516c01 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_True.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_True.yaml @@ -57,7 +57,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -117,7 +117,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_With_Alias.yaml b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_With_Alias.yaml index f6985f2878d..55edcc2c23b 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_With_Alias.yaml +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_With_Alias.yaml @@ -59,7 +59,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @lookup + bookById(id: Int!): Book @lookup books( "Returns the first _n_ elements from the list." first: Int @@ -119,7 +119,7 @@ sourceSchemas: } type Query { - authorById(id: Int!): Author! @internal @lookup + authorById(id: Int!): Author @internal @lookup authors( "Returns the first _n_ elements from the list." first: Int 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 0e82c54e4c8..3d5d0d57f82 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 @@ -108,7 +108,7 @@ sourceSchemas: } type InternalLookups @internal { - authorById(id: ID!): Author! @lookup + authorById(id: ID!): Author @lookup } type Query { 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 7f3207b1b58..0b72bb5feb7 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 @@ -113,7 +113,7 @@ sourceSchemas: } type InternalLookups @internal { - author(by: AuthorByInput! @is(field: "{\n id\n} | {\n name\n}")): Author! + author(by: AuthorByInput! @is(field: "{\n id\n} | {\n name\n}")): Author @lookup @internal } 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 665a576f8c9..9014593f5df 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 @@ -49,7 +49,7 @@ sourceSchemas: } type InternalLookups @internal { - author(by: AuthorByInput! @is(field: "{\n id\n} | {\n name\n}")): Author! + author(by: AuthorByInput! @is(field: "{\n id\n} | {\n name\n}")): Author @lookup @internal } 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 e8c0ede8697..ab98a884809 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 @@ -122,7 +122,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup + bookById(id: Int!): Book @internal @lookup } interactions: - request: 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 1f9891621a2..de35051ce90 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 @@ -84,7 +84,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup + bookById(id: Int!): Book @internal @lookup } interactions: - request: 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 f954ef8208d..1afdc2d1890 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 @@ -78,7 +78,7 @@ sourceSchemas: } type Query { - productById(id: Int!): Product! @lookup + productById(id: Int!): Product @lookup } interactions: - request: @@ -105,7 +105,9 @@ sourceSchemas: ] } ], - "data": null + "data": { + "productById": null + } } operationPlan: operation: 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 913551cd501..548dee94634 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 @@ -71,7 +71,7 @@ sourceSchemas: } type Query { - productById(id: Int!): Product! @lookup + productById(id: Int!): Product @lookup } interactions: - request: @@ -98,7 +98,9 @@ sourceSchemas: ] } ], - "data": null + "data": { + "productById": null + } } operationPlan: operation: 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 4472df2dfcc..7d56036cfa9 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 @@ -78,7 +78,7 @@ sourceSchemas: } type Query { - productById(id: Int!): Product! @lookup + productById(id: Int!): Product @lookup } interactions: - request: @@ -106,7 +106,9 @@ sourceSchemas: ] } ], - "data": null + "data": { + "productById": null + } } operationPlan: operation: 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 daf45c66c77..0bf22d369a6 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 @@ -71,7 +71,7 @@ sourceSchemas: } type Query { - productById(id: Int!): Product! @lookup + productById(id: Int!): Product @lookup } interactions: - request: @@ -99,7 +99,9 @@ sourceSchemas: ] } ], - "data": null + "data": { + "productById": null + } } operationPlan: operation: 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 7b54deb2887..3d50939c711 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 @@ -102,7 +102,7 @@ sourceSchemas: } type Query { - bookById(id: Int!): Book! @internal @lookup + bookById(id: Int!): Book @internal @lookup } interactions: - request: diff --git a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/FusionTestBase.cs b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/FusionTestBase.cs index fb74032e8e8..e25805ad3a5 100644 --- a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/FusionTestBase.cs +++ b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/FusionTestBase.cs @@ -167,7 +167,7 @@ type Query { node(id: ID!): Node @lookup @shareable nodes(ids: [ID!]!): [Node]! @shareable orderById(id: ID!): Order @lookup @shareable - userById(id: ID!): User! @lookup @internal + userById(id: ID!): User @lookup @internal } type User { @@ -220,7 +220,7 @@ type Query { node(id: ID!): Node @lookup @shareable nodes(ids: [ID!]!): [Node]! @shareable paymentById(id: ID!): Payment @lookup - orderById(id: ID!): Order! @lookup @shareable + orderById(id: ID!): Order @lookup @shareable } input CreatePaymentInput { @@ -344,7 +344,7 @@ type ProductReviewsEdge { type Query { node(id: ID!): Node @lookup @shareable nodes(ids: [ID!]!): [Node]! @shareable - productById(id: ID!): Product! @lookup @internal + productById(id: ID!): Product @lookup @internal reviewById(id: ID!): Review @lookup userById(id: ID!): User @lookup @internal } @@ -404,7 +404,7 @@ type Product { } type Query { - productById(id: ID!): Product! @lookup @internal + productById(id: ID!): Product @lookup @internal } input ProductDimensionInput { diff --git a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Planning/RequirementTests.cs b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Planning/RequirementTests.cs index 79e5eb5a8e0..82d92201da0 100644 --- a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Planning/RequirementTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Planning/RequirementTests.cs @@ -87,7 +87,7 @@ type Product { } type Query { - productById(id: Int!): Product! @lookup @internal + productById(id: Int!): Product @lookup @internal } """"); @@ -151,7 +151,7 @@ type Product { } type Query { - productById(id: Int!): Product! @lookup @internal + productById(id: Int!): Product @lookup @internal } input NameInput { diff --git a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/__resources__/k6-reviews.graphqls b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/__resources__/k6-reviews.graphqls index 199a5f59681..0e2f03dfd28 100644 --- a/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/__resources__/k6-reviews.graphqls +++ b/src/HotChocolate/Fusion/test/Fusion.Execution.Tests/__resources__/k6-reviews.graphqls @@ -8,7 +8,7 @@ type Product { } type Query { - product(upc: ID!): Product! @lookup @internal + product(upc: ID!): Product @lookup @internal review(id: ID!): Review @lookup user(id: ID!): User @lookup @internal } @@ -43,7 +43,7 @@ type User @internal { id: ID! name: String! } - + directive @internal on OBJECT | FIELD_DEFINITION """ directive @internal on OBJECT | FIELD_DEFINITION diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/__resources__/invalid-example-1/source-schema-1.graphqls b/src/Nitro/CommandLine/test/CommandLine.Tests/__resources__/invalid-example-1/source-schema-1.graphqls index de50d8e9b68..9d2676e65ad 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/__resources__/invalid-example-1/source-schema-1.graphqls +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/__resources__/invalid-example-1/source-schema-1.graphqls @@ -6,6 +6,6 @@ type Query { userById(id: ID!): User! @lookup @shareable # Warning: LOOKUP_RETURNS_NON_NULLABLE_TYPE } -type User { +type User @key(fields: "id") { id: ID! } diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/__resources__/invalid-example-1/source-schema-2.graphqls b/src/Nitro/CommandLine/test/CommandLine.Tests/__resources__/invalid-example-1/source-schema-2.graphqls index 9e54af98c0a..3420bd649dc 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/__resources__/invalid-example-1/source-schema-2.graphqls +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/__resources__/invalid-example-1/source-schema-2.graphqls @@ -6,7 +6,7 @@ type Query { userById(id: ID!): User! @lookup @shareable # Warning: LOOKUP_RETURNS_NON_NULLABLE_TYPE } -type User { +type User @key(fields: "id") { id: ID! username: String! } From 4392815dfba9802801ccaf50b73f002888530611 Mon Sep 17 00:00:00 2001 From: Glen Date: Mon, 13 Apr 2026 14:59:34 +0200 Subject: [PATCH 4/5] Update snapshots --- .../__snapshots__/AbstractTypeTests.Abstract_Type.yaml | 2 +- ...ypeTests.Abstract_Type_Direct_Source_Schema_Call.yaml | 2 +- .../AbstractTypeTests.List_Of_Abstract_Types.yaml | 2 +- ...or_With_Path_For_Root_Field_NonNull_OnError_Null.yaml | 6 ++++-- ...th_Path_For_Root_Field_NonNull_OnError_Propagate.yaml | 9 +++++++-- ...Without_Path_For_Root_Field_NonNull_OnError_Null.yaml | 2 +- ...ut_Path_For_Root_Field_NonNull_OnError_Propagate.yaml | 5 ++++- 7 files changed, 19 insertions(+), 9 deletions(-) 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 82b371d38c7..6c908c3bb8a 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 @@ -91,7 +91,7 @@ sourceSchemas: "Returns the elements in the list that come before the specified cursor." before: String ): InterfaceConnectionConnection - authorById(id: Int!): Author! @lookup + authorById(id: Int!): Author @lookup } interactions: - request: 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 b60b19d95b8..007ee5b5c8d 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 @@ -96,7 +96,7 @@ sourceSchemas: "Returns the elements in the list that come before the specified cursor." before: String ): InterfaceConnectionConnection - authorById(id: Int!): Author! @lookup + authorById(id: Int!): Author @lookup } interactions: - request: 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 352f2906cfc..7d4b9f37461 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 @@ -100,7 +100,7 @@ sourceSchemas: "Returns the elements in the list that come before the specified cursor." before: String ): InterfaceConnectionConnection - authorById(id: Int!): Author! @lookup + authorById(id: Int!): Author @lookup } interactions: - request: 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 5a508090605..3ec946a607e 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 @@ -35,7 +35,7 @@ sourceSchemas: } type Query { - productById(id: Int!): Product! @lookup + productById(id: Int!): Product @lookup } interactions: - request: @@ -58,7 +58,9 @@ sourceSchemas: ] } ], - "data": null + "data": { + "productById": null + } } operationPlan: operation: 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 2d0a14512f2..fc9b487fde2 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 @@ -9,6 +9,9 @@ request: response: body: | { + "data": { + "productById": null + }, "errors": [ { "message": "Could not resolve Product", @@ -31,7 +34,7 @@ sourceSchemas: } type Query { - productById(id: Int!): Product! @lookup + productById(id: Int!): Product @lookup } interactions: - request: @@ -54,7 +57,9 @@ sourceSchemas: ] } ], - "data": null + "data": { + "productById": null + } } operationPlan: operation: 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 0acfb0b3340..d2178dbce5d 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 @@ -38,7 +38,7 @@ sourceSchemas: } type Query { - productById(id: Int!): Product! @lookup + productById(id: Int!): Product @lookup } interactions: - request: 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 a10de05fba2..c46d5609c2b 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 @@ -9,6 +9,9 @@ request: response: body: | { + "data": { + "productById": null + }, "errors": [ { "message": "A global error" @@ -34,7 +37,7 @@ sourceSchemas: } type Query { - productById(id: Int!): Product! @lookup + productById(id: Int!): Product @lookup } interactions: - request: From 8d0997546e5af860ff58f5bb6fe0c6b67aed033c Mon Sep 17 00:00:00 2001 From: Glen Date: Mon, 13 Apr 2026 15:10:34 +0200 Subject: [PATCH 5/5] Remove test theory --- .../SourceSchemaErrorTests.cs | 42 ----- ...For_Lookup_Field_NonNull_OnError_Null.yaml | 152 ------------------ ...ookup_Field_NonNull_OnError_Propagate.yaml | 145 ----------------- 3 files changed, 339 deletions(-) delete mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Null.yaml delete mode 100644 src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml diff --git a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs index 1b9a1b633a3..4347a8df220 100644 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs +++ b/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SourceSchemaErrorTests.cs @@ -587,48 +587,6 @@ public async Task Error_On_Lookup_Leaf_In_List_NonNull(ErrorHandlingMode onError await MatchSnapshotAsync(gateway, request, result, postFix: "OnError_" + onError); } - [Theory] - [InlineData(ErrorHandlingMode.Propagate)] - [InlineData(ErrorHandlingMode.Null)] - public async Task No_Data_And_Error_With_Path_For_Lookup_Field_NonNull(ErrorHandlingMode onError) - { - // 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) - ]); - - // act - using var client = GraphQLHttpClient.Create(gateway.CreateClient()); - - var request = new OperationRequest( - """ - { - topProduct { - price - name - } - } - """, - onError: onError); - - using var result = await client.PostAsync( - request, - new Uri("http://localhost:5000/graphql")); - - // assert - await MatchSnapshotAsync(gateway, request, result, postFix: "OnError_" + onError); - } - [Theory] [InlineData(ErrorHandlingMode.Propagate)] [InlineData(ErrorHandlingMode.Null)] 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 deleted file mode 100644 index 1afdc2d1890..00000000000 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Null.yaml +++ /dev/null @@ -1,152 +0,0 @@ -title: No_Data_And_Error_With_Path_For_Lookup_Field_NonNull -request: - onError: Null - document: | - { - topProduct { - price - name - } - } -response: - body: | - { - "data": { - "topProduct": { - "price": 13.99, - "name": null - } - }, - "errors": [ - { - "message": "Could not resolve Product", - "path": [ - "topProduct", - "name" - ] - } - ] - } -sourceSchemas: - - name: A - schema: | - schema { - query: Query - } - - type Product { - id: Int! - price: Float! - } - - type Query { - topProduct: Product! - nullableTopProduct: Product - topProducts: [Product!]! - productById(id: Int!): Product @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_e24d93b6_1 { - topProduct { - price - id - } - } - response: - results: - - | - { - "data": { - "topProduct": { - "price": 13.99, - "id": 1 - } - } - } - - name: B - schema: | - schema { - query: Query - } - - type Product { - name: String! - id: Int! - } - - type Query { - productById(id: Int!): Product @lookup - } - interactions: - - request: - accept: application/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!) { - productById(id: $__fusion_1_id) { - name - } - } - variables: | - { - "__fusion_1_id": 1 - } - response: - results: - - | - { - "errors": [ - { - "message": "Could not resolve Product", - "path": [ - "productById" - ] - } - ], - "data": { - "productById": null - } - } -operationPlan: - operation: - - document: | - { - topProduct { - price - name - id @fusion__requirement - } - } - hash: e24d93b6245cedd878fff4452f5f16b9 - searchSpace: 1 - expandedNodes: 2 - nodes: - - id: 1 - type: Operation - schema: A - operation: | - query Op_e24d93b6_1 { - topProduct { - price - id - } - } - - id: 2 - type: Operation - schema: B - operation: | - query Op_e24d93b6_2($__fusion_1_id: Int!) { - productById(id: $__fusion_1_id) { - name - } - } - source: $.productById - target: $.topProduct - requirements: - - name: __fusion_1_id - selectionMap: >- - id - dependencies: - - 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_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 deleted file mode 100644 index 548dee94634..00000000000 --- a/src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/__snapshots__/SourceSchemaErrorTests.No_Data_And_Error_With_Path_For_Lookup_Field_NonNull_OnError_Propagate.yaml +++ /dev/null @@ -1,145 +0,0 @@ -title: No_Data_And_Error_With_Path_For_Lookup_Field_NonNull -request: - document: | - { - topProduct { - price - name - } - } -response: - body: | - { - "errors": [ - { - "message": "Could not resolve Product", - "path": [ - "topProduct", - "name" - ] - } - ] - } -sourceSchemas: - - name: A - schema: | - schema { - query: Query - } - - type Product { - id: Int! - price: Float! - } - - type Query { - topProduct: Product! - nullableTopProduct: Product - topProducts: [Product!]! - productById(id: Int!): Product @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_e24d93b6_1 { - topProduct { - price - id - } - } - response: - results: - - | - { - "data": { - "topProduct": { - "price": 13.99, - "id": 1 - } - } - } - - name: B - schema: | - schema { - query: Query - } - - type Product { - name: String! - id: Int! - } - - type Query { - productById(id: Int!): Product @lookup - } - interactions: - - request: - accept: application/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!) { - productById(id: $__fusion_1_id) { - name - } - } - variables: | - { - "__fusion_1_id": 1 - } - response: - results: - - | - { - "errors": [ - { - "message": "Could not resolve Product", - "path": [ - "productById" - ] - } - ], - "data": { - "productById": null - } - } -operationPlan: - operation: - - document: | - { - topProduct { - price - name - id @fusion__requirement - } - } - hash: e24d93b6245cedd878fff4452f5f16b9 - searchSpace: 1 - expandedNodes: 2 - nodes: - - id: 1 - type: Operation - schema: A - operation: | - query Op_e24d93b6_1 { - topProduct { - price - id - } - } - - id: 2 - type: Operation - schema: B - operation: | - query Op_e24d93b6_2($__fusion_1_id: Int!) { - productById(id: $__fusion_1_id) { - name - } - } - source: $.productById - target: $.topProduct - requirements: - - name: __fusion_1_id - selectionMap: >- - id - dependencies: - - id: 1