Skip to content

Commit 7faac2e

Browse files
authored
Updated the spec URL for GraphQL custom scalars (#8866)
1 parent 077c6e8 commit 7faac2e

File tree

17 files changed

+21
-21
lines changed

17 files changed

+21
-21
lines changed

dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ accessibilities
55
agrc
66
Alderaan
77
Andi
8+
andimarek
89
ASPDEPR004
910
ASPDEPR008
1011
aspnetcore

src/HotChocolate/Core/src/Types/Types/Scalars/DateTimeType.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ namespace HotChocolate.Types;
99
/// <summary>
1010
/// This GraphQL Scalar represents an exact point in time.
1111
/// This point in time is specified by having an offset to UTC and does not use time zone.
12-
///
13-
/// https://www.graphql-scalars.com/date-time/
1412
/// </summary>
13+
/// <seealso href="https://scalars.graphql.org/andimarek/date-time.html">Specification</seealso>
1514
public class DateTimeType : ScalarType<DateTimeOffset, StringValueNode>
1615
{
1716
private const string UtcFormat = "yyyy-MM-ddTHH\\:mm\\:ss.fffZ";
1817
private const string LocalFormat = "yyyy-MM-ddTHH\\:mm\\:ss.fffzzz";
19-
private const string SpecifiedByUri = "https://www.graphql-scalars.com/date-time";
18+
private const string SpecifiedByUri = "https://scalars.graphql.org/andimarek/date-time.html";
2019

2120
private static readonly Regex s_dateTimeScalarRegex = new(
2221
@"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?(Z|[+-][0-9]{2}:[0-9]{2})$",
@@ -196,7 +195,7 @@ private bool TryDeserializeFromString(
196195
}
197196

198197
// No "Unknown Local Offset Convention".
199-
// https://www.graphql-scalars.com/date-time/#no-unknown-local-offset-convention
198+
// https://scalars.graphql.org/andimarek/date-time.html#sec-Overview.No-Unknown-Local-Offset-Convention-
200199
if (serialized.EndsWith("-00:00"))
201200
{
202201
value = null;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"data": {
33
"__type": {
4-
"specifiedByURL": "https://www.graphql-scalars.com/date-time"
4+
"specifiedByURL": "https://scalars.graphql.org/andimarek/date-time.html"
55
}
66
}
77
}

src/HotChocolate/Core/test/Types.Tests/Configuration/__snapshots__/TypeDiscoveryTests.InferDateTime.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ type QueryWithDateTime {
1111
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR
1212

1313
"The `DateTime` scalar represents an ISO-8601 compliant date time type."
14-
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
14+
scalar DateTime @specifiedBy(url: "https:\/\/scalars.graphql.org\/andimarek\/date-time.html")

src/HotChocolate/Core/test/Types.Tests/Configuration/__snapshots__/TypeDiscoveryTests.InferDateTimeFromModel.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ directive @specifiedBy("The specifiedBy URL points to a human-readable specifica
5252
scalar Date
5353

5454
"The `DateTime` scalar represents an ISO-8601 compliant date time type."
55-
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
55+
scalar DateTime @specifiedBy(url: "https:\/\/scalars.graphql.org\/andimarek\/date-time.html")

src/HotChocolate/Core/test/Types.Tests/Configuration/__snapshots__/TypeDiscoveryTests.TypeDiscovery_Should_InferStructs.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ type QueryTypeWithStruct {
2222
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR
2323

2424
"The `DateTime` scalar represents an ISO-8601 compliant date time type."
25-
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
25+
scalar DateTime @specifiedBy(url: "https:\/\/scalars.graphql.org\/andimarek\/date-time.html")
2626

2727
scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")

src/HotChocolate/Core/test/Types.Tests/Types/Directives/SpecifiedByDirectiveTypeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type Query1 {
5858
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR
5959
6060
"The `DateTime` scalar represents an ISO-8601 compliant date time type."
61-
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
61+
scalar DateTime @specifiedBy(url: "https:\/\/scalars.graphql.org\/andimarek\/date-time.html")
6262
""")
6363
.UseField(next => next)
6464
.BuildSchemaAsync();

src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/SpecifiedByDirectiveTypeTests.EnsureSpecifiedByDirectiveExistsInSdl.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ type Query1 {
1010
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR
1111

1212
"The `DateTime` scalar represents an ISO-8601 compliant date time type."
13-
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
13+
scalar DateTime @specifiedBy(url: "https:\/\/scalars.graphql.org\/andimarek\/date-time.html")

src/HotChocolate/Core/test/Types.Tests/Types/Scalars/DateTimeTypeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ public static TheoryData<string, DateTimeOffset> ValidDateTimeScalarStrings()
432432
{
433433
return new TheoryData<string, DateTimeOffset>
434434
{
435-
// https://www.graphql-scalars.com/date-time/#test-cases (valid strings)
435+
// https://scalars.graphql.org/andimarek/date-time.html#sec-Overview.Examples (valid examples)
436436
{
437437
// A DateTime with UTC offset (+00:00).
438438
"2011-08-30T13:22:53.108Z",
@@ -476,7 +476,7 @@ public static TheoryData<string> InvalidDateTimeScalarStrings()
476476
{
477477
return
478478
[
479-
// https://www.graphql-scalars.com/date-time/#test-cases (invalid strings)
479+
// https://scalars.graphql.org/andimarek/date-time.html#sec-Overview.Examples (invalid examples)
480480
// The minutes of the offset are missing.
481481
"2011-08-30T13:22:53.108-03",
482482
// Too many digits for fractions of a second. Exactly three expected.

src/HotChocolate/Core/test/Types.Tests/__snapshots__/CodeFirstTests.Change_DefaultBinding_For_DateTime.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ directive @specifiedBy("The specifiedBy URL points to a human-readable specifica
1818
scalar Date
1919

2020
"The `DateTime` scalar represents an ISO-8601 compliant date time type."
21-
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
21+
scalar DateTime @specifiedBy(url: "https:\/\/scalars.graphql.org\/andimarek\/date-time.html")

0 commit comments

Comments
 (0)