Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Linq2GraphQL.Client/ArgumentValue.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Linq2GraphQL.Client;

public class ArgumentValue
public record ArgumentValue
{
public ArgumentValue(string graphName, string graphType, object value)
{
Expand All @@ -10,8 +10,8 @@ public ArgumentValue(string graphName, string graphType, object value)
VariableName = graphName;
}

public string GraphName { get; set; }
public string GraphType { get; set; }
public object Value { get; set; }
public string VariableName { get; set; }
public string GraphName { get; init; }
public string GraphType { get; init; }
public object Value { get; init; }
public string VariableName { get; set; } // mutable: unique suffix appended during query building
}
6 changes: 3 additions & 3 deletions src/Linq2GraphQL.Client/GraphQLRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Linq2GraphQL.Client;

public class GraphQLRequest
public record GraphQLRequest
{
[JsonPropertyName("query")] public string Query { get; set; }
[JsonPropertyName("query")] public string Query { get; init; }

[JsonPropertyName("variables")] public Dictionary<string, object> Variables { get; set; }
[JsonPropertyName("variables")] public Dictionary<string, object> Variables { get; init; }
}