Skip to content

Commit cb45ea5

Browse files
committed
feat: add key value pair
1 parent 41cfb34 commit cb45ea5

File tree

1 file changed

+27
-0
lines changed
  • hypertrace-core-graphql-common-schema/src/main/java/org/hypertrace/core/graphql/common/schema/pair

1 file changed

+27
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package org.hypertrace.core.graphql.common.schema.pair;
2+
3+
import graphql.annotations.annotationTypes.GraphQLDescription;
4+
import graphql.annotations.annotationTypes.GraphQLField;
5+
import graphql.annotations.annotationTypes.GraphQLName;
6+
import graphql.annotations.annotationTypes.GraphQLNonNull;
7+
8+
@GraphQLName(KeyValuePair.TYPE_NAME)
9+
@GraphQLDescription("A pair of a key and a value")
10+
public interface KeyValuePair {
11+
String TYPE_NAME = "KeyValuePair";
12+
13+
String KEY = "key";
14+
String VALUE = "value";
15+
16+
@GraphQLField
17+
@GraphQLName(KEY)
18+
@GraphQLNonNull
19+
@GraphQLDescription("String based key name")
20+
String key();
21+
22+
@GraphQLField
23+
@GraphQLName(VALUE)
24+
@GraphQLNonNull
25+
@GraphQLDescription("Value of a generic type")
26+
Object value();
27+
}

0 commit comments

Comments
 (0)