Skip to content

Commit 9ee7dd3

Browse files
authored
[Fusion] Parse @cost weight with InvariantCulture (#9791)
1 parent 802fe27 commit 9ee7dd3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/HotChocolate/Fusion/src/Fusion.Composition/Directives/CostDirective.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Globalization;
12
using HotChocolate.Language;
23
using HotChocolate.Types;
34
using static HotChocolate.Fusion.Properties.CompositionResources;
@@ -17,6 +18,6 @@ public static CostDirective From(IDirective directive)
1718
throw new InvalidOperationException(CostDirective_WeightArgument_Invalid);
1819
}
1920

20-
return new CostDirective(double.Parse(name.Value));
21+
return new CostDirective(double.Parse(name.Value, CultureInfo.InvariantCulture));
2122
}
2223
}

0 commit comments

Comments
 (0)