Skip to content

Commit

Permalink
Fix stack overflow when using DateTimeOffset params
Browse files Browse the repository at this point in the history
Adding support for DTO in the serialize method.
  • Loading branch information
brphelps authored Feb 7, 2020
1 parent 204c573 commit 8541f50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Octokit.GraphQL.Core/Core/Serializers/QuerySerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ private void SerializeValue(StringBuilder builder, object value)
{
builder.Append(JsonConvert.ToString(id.Value, '"'));
}
else if (value is DateTimeOffset dto)
{
builder.Append(JsonConvert.ToString(dto, DateFormatHandling.IsoDateFormat));
}
else if (value is IEnumerable)
{
builder.Append("[");
Expand Down

0 comments on commit 8541f50

Please sign in to comment.