Skip to content

Commit 96ce95d

Browse files
authored
RFC: Map type
1 parent ffb1fcc commit 96ce95d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

spec/Section 2 -- Language.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,6 @@ ListValue : [ Value+ ]
10391039
* Append {value} to {inputList}.
10401040
* Return {inputList}
10411041

1042-
10431042
### Input Object Values
10441043

10451044
ObjectValue[Const] :
@@ -1144,15 +1143,19 @@ that variable, that operation is invalid (see [All Variable Uses Defined](#sec-A
11441143
Type :
11451144
- NamedType
11461145
- ListType
1146+
- MapType
11471147
- NonNullType
11481148

11491149
NamedType : Name
11501150

11511151
ListType : [ Type ]
11521152

1153+
MapType : { Type }
1154+
11531155
NonNullType :
11541156
- NamedType !
11551157
- ListType !
1158+
- MapType !
11561159

11571160
GraphQL describes the types of data expected by arguments and variables.
11581161
Input types may be lists of another input type, or a non-null variant of any
@@ -1173,6 +1176,12 @@ Type : [ Type ]
11731176
* Let {type} be a List type where {itemType} is the contained type.
11741177
* Return {type}
11751178

1179+
Type : { Type }
1180+
1181+
* Let {itemType} be the result of evaluating {Type}
1182+
* Let {type} be a Map type where {itemType} is the value corresponding to a non-null string key.
1183+
* Return {type}
1184+
11761185
Type : Type !
11771186

11781187
* Let {nullableType} be the result of evaluating {Type}

0 commit comments

Comments
 (0)