diff --git a/src/Linq2GraphQL.Client/ArgumentValue.cs b/src/Linq2GraphQL.Client/ArgumentValue.cs index f7b5151..9c01eed 100644 --- a/src/Linq2GraphQL.Client/ArgumentValue.cs +++ b/src/Linq2GraphQL.Client/ArgumentValue.cs @@ -1,6 +1,6 @@ namespace Linq2GraphQL.Client; -public class ArgumentValue +public record ArgumentValue { public ArgumentValue(string graphName, string graphType, object value) { @@ -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 } \ No newline at end of file diff --git a/src/Linq2GraphQL.Client/GraphQLRequest.cs b/src/Linq2GraphQL.Client/GraphQLRequest.cs index b60f063..9835454 100644 --- a/src/Linq2GraphQL.Client/GraphQLRequest.cs +++ b/src/Linq2GraphQL.Client/GraphQLRequest.cs @@ -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 Variables { get; set; } + [JsonPropertyName("variables")] public Dictionary Variables { get; init; } } \ No newline at end of file