Skip to content

Commit e5bc3f9

Browse files
authored
SDLSorter fixes (#329)
1 parent 5be1a2d commit e5bc3f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/GraphQLParser/Visitors/SDLSorter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private SDLSorter()
1919
/// </summary>
2020
public static void Sort(ASTNode node, SDLSorterOptions? options = null)
2121
#pragma warning disable CA2012 // Use ValueTasks correctly
22-
=> _ = _sorter.VisitAsync(node, options ?? SDLSorterOptions.Default);
22+
=> _sorter.VisitAsync(node, options ?? SDLSorterOptions.Default).GetAwaiter().GetResult();
2323
#pragma warning restore CA2012 // Use ValueTasks correctly
2424

2525
/// <inheritdoc/>

src/GraphQLParser/Visitors/SDLSorterOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public virtual int Compare(ASTNode x, ASTNode y)
6969

7070
/// <inheritdoc/>
7171
public int Compare(DirectiveLocation x, DirectiveLocation y)
72-
=> Comparer<string>.Default.Compare(x.ToString(), y.ToString());
72+
=> string.Compare(x.ToString(), y.ToString(), StringComparison);
7373

7474
int IComparer<ASTNode>.Compare(ASTNode? x, ASTNode? y) => Compare(x!, y!);
7575
}

0 commit comments

Comments
 (0)