Skip to content

Commit 1e4a7cb

Browse files
committed
add non-generic interface and implement it with GraphQLResponse
1 parent 98cb88d commit 1e4a7cb

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/GraphQL.Primitives/GraphQLResponse.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
namespace GraphQL
77
{
88

9-
public class GraphQLResponse<T> : IEquatable<GraphQLResponse<T>?>
9+
public class GraphQLResponse<T> : IGraphQLResponse, IEquatable<GraphQLResponse<T>?>
1010
{
1111

1212
[DataMember(Name = "data")]
1313
public T Data { get; set; }
14+
object IGraphQLResponse.Data => Data;
1415

1516
[DataMember(Name = "errors")]
1617
public GraphQLError[]? Errors { get; set; }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace GraphQL
2+
{
3+
public interface IGraphQLResponse
4+
{
5+
object Data { get; }
6+
7+
GraphQLError[]? Errors { get; set; }
8+
9+
Map? Extensions { get; set; }
10+
}
11+
}

0 commit comments

Comments
 (0)