diff --git a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET9_0_Fusion.json b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET9_0_Fusion.json index 5a1497b9653..2ce51e850dc 100644 --- a/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET9_0_Fusion.json +++ b/src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/__snapshots__/OpenApiIntegrationTestBase.OpenApi_Includes_Initial_Routes_NET9_0_Fusion.json @@ -42,10 +42,30 @@ "type": "object", "properties": { "any": { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], "description": "The `Any` scalar type represents any valid GraphQL value." }, "base64String": { + "pattern": "\"^(?:[A-Za-z0-9+\\\\/]{4})*(?:[A-Za-z0-9+\\\\/]{2}==|[A-Za-z0-9+\\\\/]{3}=)?$\"", "type": "string", "description": "The `Base64String` scalar type represents an array of bytes encoded as a Base64 string." }, @@ -53,20 +73,24 @@ "type": "boolean" }, "byte": { - "type": "string", - "description": "The `Byte` scalar type represents a signed 8-bit integer." + "type": "integer", + "description": "The `Byte` scalar type represents a signed 8-bit integer.", + "format": "int32" }, "date": { + "pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"", "type": "string", "description": "The `Date` scalar type represents a date in UTC." }, "dateTime": { + "pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?(?:[Zz]|[+-]\\\\d{2}:\\\\d{2})$\"", "type": "string", "description": "The `DateTime` scalar type represents a date and time with time zone offset information." }, "decimal": { - "type": "string", - "description": "The `Decimal` scalar type represents a decimal floating-point number with high precision." + "type": "number", + "description": "The `Decimal` scalar type represents a decimal floating-point number with high precision.", + "format": "float" }, "enum": { "enum": [ @@ -94,7 +118,26 @@ "format": "int32" }, "json": { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], "description": "The `Any` scalar type represents any valid GraphQL value." }, "list": { @@ -104,20 +147,24 @@ } }, "localDate": { + "pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"", "type": "string", "description": "The `LocalDate` scalar type represents a date without time or time zone information." }, "localDateTime": { + "pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"", "type": "string", "description": "The `LocalDateTime` scalar type represents a date and time without time zone information." }, "localTime": { + "pattern": "\"^\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"", "type": "string", "description": "The `LocalTime` scalar type represents a time of day without date or time zone information." }, "long": { - "type": "string", - "description": "The `Long` scalar type represents a signed 64-bit integer." + "type": "integer", + "description": "The `Long` scalar type represents a signed 64-bit integer.", + "format": "int32" }, "object": { "required": [ @@ -138,6 +185,7 @@ "type": "object", "properties": { "field1C": { + "pattern": "\"^\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"", "type": "string", "description": "field1C description" } @@ -150,13 +198,15 @@ } }, "short": { - "type": "string", - "description": "The `Short` scalar type represents a signed 16-bit integer." + "type": "integer", + "description": "The `Short` scalar type represents a signed 16-bit integer.", + "format": "int32" }, "string": { "type": "string" }, "timeSpan": { + "pattern": "\"^-?P(?:\\\\d+W|(?=\\\\d|T(?:\\\\d|$))(?:\\\\d+Y)?(?:\\\\d+M)?(?:\\\\d+D)?(?:T(?:\\\\d+H)?(?:\\\\d+M)?(?:\\\\d+(?:\\\\.\\\\d+)?S)?)?)$\"", "type": "string", "description": "The `TimeSpan` scalar type represents a duration of time." }, @@ -172,6 +222,7 @@ "description": "The `URL` scalar type represents a Uniform Resource Locator (URL) as defined by RFC 3986." }, "uuid": { + "pattern": "\"^[\\\\da-fA-F]{8}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{12}$\"", "type": "string", "description": "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562." } @@ -216,11 +267,31 @@ "type": "object", "properties": { "any": { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], "description": "The `Any` scalar type represents any valid GraphQL value.", "nullable": true }, "base64String": { + "pattern": "\"^(?:[A-Za-z0-9+\\\\/]{4})*(?:[A-Za-z0-9+\\\\/]{2}==|[A-Za-z0-9+\\\\/]{3}=)?$\"", "type": "string", "description": "The `Base64String` scalar type represents an array of bytes encoded as a Base64 string.", "nullable": true @@ -230,23 +301,27 @@ "nullable": true }, "byte": { - "type": "string", + "type": "integer", "description": "The `Byte` scalar type represents a signed 8-bit integer.", + "format": "int32", "nullable": true }, "date": { + "pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"", "type": "string", "description": "The `Date` scalar type represents a date in UTC.", "nullable": true }, "dateTime": { + "pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?(?:[Zz]|[+-]\\\\d{2}:\\\\d{2})$\"", "type": "string", "description": "The `DateTime` scalar type represents a date and time with time zone offset information.", "nullable": true }, "decimal": { - "type": "string", + "type": "number", "description": "The `Decimal` scalar type represents a decimal floating-point number with high precision.", + "format": "float", "nullable": true }, "enum": { @@ -279,7 +354,26 @@ "nullable": true }, "json": { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "array" + } + ], "description": "The `Any` scalar type represents any valid GraphQL value.", "nullable": true }, @@ -292,23 +386,27 @@ "nullable": true }, "localDate": { + "pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"", "type": "string", "description": "The `LocalDate` scalar type represents a date without time or time zone information.", "nullable": true }, "localDateTime": { + "pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"", "type": "string", "description": "The `LocalDateTime` scalar type represents a date and time without time zone information.", "nullable": true }, "localTime": { + "pattern": "\"^\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"", "type": "string", "description": "The `LocalTime` scalar type represents a time of day without date or time zone information.", "nullable": true }, "long": { - "type": "string", + "type": "integer", "description": "The `Long` scalar type represents a signed 64-bit integer.", + "format": "int32", "nullable": true }, "object": { @@ -330,6 +428,7 @@ "type": "object", "properties": { "field1C": { + "pattern": "\"^\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"", "type": "string", "description": "The `LocalTime` scalar type represents a time of day without date or time zone information.", "nullable": true @@ -344,8 +443,9 @@ "nullable": true }, "short": { - "type": "string", + "type": "integer", "description": "The `Short` scalar type represents a signed 16-bit integer.", + "format": "int32", "nullable": true }, "string": { @@ -353,6 +453,7 @@ "nullable": true }, "timeSpan": { + "pattern": "\"^-?P(?:\\\\d+W|(?=\\\\d|T(?:\\\\d|$))(?:\\\\d+Y)?(?:\\\\d+M)?(?:\\\\d+D)?(?:T(?:\\\\d+H)?(?:\\\\d+M)?(?:\\\\d+(?:\\\\.\\\\d+)?S)?)?)$\"", "type": "string", "description": "The `TimeSpan` scalar type represents a duration of time.", "nullable": true @@ -367,6 +468,7 @@ "nullable": true }, "uuid": { + "pattern": "\"^[\\\\da-fA-F]{8}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{12}$\"", "type": "string", "description": "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562.", "nullable": true diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/DeferOverHttpTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/DeferOverHttpTests.cs index 84f65573e0f..9c19eebbb5f 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/DeferOverHttpTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/DeferOverHttpTests.cs @@ -1143,7 +1143,7 @@ ... @defer(label: "foo") { --- Content-Type: application/json; charset=utf-8 - {"incremental":[{"data":{"name":"Abc","description":"Abc desc","reviews":[{"rating":5}]},"path":["product"],"label":"foo"}],"hasNext":false} + {"incremental":[{"data":{"product":{"name":"Abc","description":"Abc desc","reviews":[{"rating":5}]}},"path":[],"label":"foo"}],"hasNext":false} ----- """); @@ -1193,7 +1193,7 @@ ... @defer(label: "foo") { content, StringComparison.Ordinal); Assert.Contains( - "\"incremental\":[{\"data\":{\"name\":\"Abc\",\"description\":\"Abc desc\",\"reviews\":[{\"rating\":5}]},\"path\":[\"product\"],\"label\":\"foo\"}]", + "\"incremental\":[{\"data\":{\"product\":{\"name\":\"Abc\",\"description\":\"Abc desc\",\"reviews\":[{\"rating\":5}]}},\"path\":[],\"label\":\"foo\"}]", content, StringComparison.Ordinal); Assert.Contains("event: complete", content, StringComparison.Ordinal); @@ -1244,7 +1244,7 @@ ... @defer(label: "foo") { .MatchInline( """ {"data":{"product":{"name":"Abc","description":"Abc desc"}},"hasNext":true} - {"incremental":[{"data":{"name":"Abc","description":"Abc desc","reviews":[{"rating":5}]},"path":["product"],"label":"foo"}],"hasNext":false} + {"incremental":[{"data":{"product":{"name":"Abc","description":"Abc desc","reviews":[{"rating":5}]}},"path":[],"label":"foo"}],"hasNext":false} """); } diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/Issue7040ReproTests.Enum_DefaultValueAttribute_With_Integer_Default_Does_Not_Downgrade_To_Int.graphql b/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/Issue7040ReproTests.Enum_DefaultValueAttribute_With_Integer_Default_Does_Not_Downgrade_To_Int.graphql new file mode 100644 index 00000000000..4152b0d7c0b --- /dev/null +++ b/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/Issue7040ReproTests.Enum_DefaultValueAttribute_With_Integer_Default_Does_Not_Downgrade_To_Int.graphql @@ -0,0 +1,8 @@ +input InputWithEnumIntDefaultInput { + enum: Issue7040Enum! = VALUE1 +} + +enum Issue7040Enum { + VALUE1 + VALUE2 +}