@rayfold/conformance 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,389 @@
1
+ {
2
+ "name": "Unions and type conditions (spec 02 s1)",
3
+ "schema": "\nentity Book { id: ID title: String }\nentity Author { id: ID name: String }\nunion Hit = Book | Author\nquery search: [Hit]\n",
4
+ "ir": {
5
+ "rayfold": "0.1",
6
+ "types": {
7
+ "ID": {
8
+ "kind": "scalar",
9
+ "name": "ID",
10
+ "annotations": [],
11
+ "builtin": true
12
+ },
13
+ "String": {
14
+ "kind": "scalar",
15
+ "name": "String",
16
+ "annotations": [],
17
+ "builtin": true
18
+ },
19
+ "Int": {
20
+ "kind": "scalar",
21
+ "name": "Int",
22
+ "annotations": [],
23
+ "builtin": true
24
+ },
25
+ "Long": {
26
+ "kind": "scalar",
27
+ "name": "Long",
28
+ "annotations": [],
29
+ "builtin": true
30
+ },
31
+ "Float": {
32
+ "kind": "scalar",
33
+ "name": "Float",
34
+ "annotations": [],
35
+ "builtin": true
36
+ },
37
+ "Boolean": {
38
+ "kind": "scalar",
39
+ "name": "Boolean",
40
+ "annotations": [],
41
+ "builtin": true
42
+ },
43
+ "Decimal": {
44
+ "kind": "scalar",
45
+ "name": "Decimal",
46
+ "annotations": [],
47
+ "builtin": true
48
+ },
49
+ "Instant": {
50
+ "kind": "scalar",
51
+ "name": "Instant",
52
+ "annotations": [],
53
+ "builtin": true
54
+ },
55
+ "Date": {
56
+ "kind": "scalar",
57
+ "name": "Date",
58
+ "annotations": [],
59
+ "builtin": true
60
+ },
61
+ "Duration": {
62
+ "kind": "scalar",
63
+ "name": "Duration",
64
+ "annotations": [],
65
+ "builtin": true
66
+ },
67
+ "Bytes": {
68
+ "kind": "scalar",
69
+ "name": "Bytes",
70
+ "annotations": [],
71
+ "builtin": true
72
+ },
73
+ "JSON": {
74
+ "kind": "scalar",
75
+ "name": "JSON",
76
+ "annotations": [],
77
+ "builtin": true
78
+ },
79
+ "Page": {
80
+ "kind": "object",
81
+ "name": "Page",
82
+ "builtin": true,
83
+ "typeParams": [
84
+ "T"
85
+ ],
86
+ "annotations": [],
87
+ "fields": [
88
+ {
89
+ "name": "items",
90
+ "type": {
91
+ "kind": "list",
92
+ "of": {
93
+ "kind": "named",
94
+ "name": "T",
95
+ "nullable": false
96
+ },
97
+ "nullable": false
98
+ },
99
+ "args": [],
100
+ "annotations": [],
101
+ "ordinal": 1
102
+ },
103
+ {
104
+ "name": "cursor",
105
+ "type": {
106
+ "kind": "named",
107
+ "name": "String",
108
+ "nullable": true
109
+ },
110
+ "args": [],
111
+ "annotations": [],
112
+ "ordinal": 2
113
+ },
114
+ {
115
+ "name": "hasMore",
116
+ "type": {
117
+ "kind": "named",
118
+ "name": "Boolean",
119
+ "nullable": false
120
+ },
121
+ "args": [],
122
+ "annotations": [],
123
+ "ordinal": 3
124
+ },
125
+ {
126
+ "name": "total",
127
+ "type": {
128
+ "kind": "named",
129
+ "name": "Int",
130
+ "nullable": true
131
+ },
132
+ "args": [],
133
+ "annotations": [],
134
+ "ordinal": 4
135
+ }
136
+ ]
137
+ },
138
+ "PageArgs": {
139
+ "kind": "input",
140
+ "name": "PageArgs",
141
+ "builtin": true,
142
+ "annotations": [],
143
+ "fields": [
144
+ {
145
+ "name": "first",
146
+ "type": {
147
+ "kind": "named",
148
+ "name": "Int",
149
+ "nullable": false
150
+ },
151
+ "args": [],
152
+ "default": 20,
153
+ "annotations": [],
154
+ "ordinal": 1
155
+ },
156
+ {
157
+ "name": "after",
158
+ "type": {
159
+ "kind": "named",
160
+ "name": "String",
161
+ "nullable": true
162
+ },
163
+ "args": [],
164
+ "annotations": [],
165
+ "ordinal": 2
166
+ },
167
+ {
168
+ "name": "offset",
169
+ "type": {
170
+ "kind": "named",
171
+ "name": "Int",
172
+ "nullable": true
173
+ },
174
+ "args": [],
175
+ "annotations": [],
176
+ "ordinal": 3
177
+ }
178
+ ]
179
+ },
180
+ "Book": {
181
+ "kind": "entity",
182
+ "name": "Book",
183
+ "annotations": [],
184
+ "fields": [
185
+ {
186
+ "name": "id",
187
+ "type": {
188
+ "kind": "named",
189
+ "name": "ID",
190
+ "nullable": false
191
+ },
192
+ "args": [],
193
+ "annotations": [],
194
+ "ordinal": 1
195
+ },
196
+ {
197
+ "name": "title",
198
+ "type": {
199
+ "kind": "named",
200
+ "name": "String",
201
+ "nullable": false
202
+ },
203
+ "args": [],
204
+ "annotations": [],
205
+ "ordinal": 2
206
+ }
207
+ ],
208
+ "implements": []
209
+ },
210
+ "Author": {
211
+ "kind": "entity",
212
+ "name": "Author",
213
+ "annotations": [],
214
+ "fields": [
215
+ {
216
+ "name": "id",
217
+ "type": {
218
+ "kind": "named",
219
+ "name": "ID",
220
+ "nullable": false
221
+ },
222
+ "args": [],
223
+ "annotations": [],
224
+ "ordinal": 1
225
+ },
226
+ {
227
+ "name": "name",
228
+ "type": {
229
+ "kind": "named",
230
+ "name": "String",
231
+ "nullable": false
232
+ },
233
+ "args": [],
234
+ "annotations": [],
235
+ "ordinal": 2
236
+ }
237
+ ],
238
+ "implements": []
239
+ },
240
+ "Hit": {
241
+ "kind": "union",
242
+ "name": "Hit",
243
+ "annotations": [],
244
+ "members": [
245
+ "Book",
246
+ "Author"
247
+ ]
248
+ }
249
+ },
250
+ "ops": {
251
+ "search": {
252
+ "kind": "query",
253
+ "name": "search",
254
+ "args": [],
255
+ "returns": {
256
+ "kind": "list",
257
+ "of": {
258
+ "kind": "named",
259
+ "name": "Hit",
260
+ "nullable": false
261
+ },
262
+ "nullable": false
263
+ },
264
+ "throws": [],
265
+ "emits": [],
266
+ "annotations": []
267
+ }
268
+ },
269
+ "views": {}
270
+ },
271
+ "data": {
272
+ "Hit": [
273
+ {
274
+ "$type": "Book",
275
+ "id": "b1",
276
+ "title": "T1"
277
+ },
278
+ {
279
+ "$type": "Author",
280
+ "id": "a1",
281
+ "name": "Ann"
282
+ }
283
+ ]
284
+ },
285
+ "resolvers": {
286
+ "Query": {
287
+ "search": {
288
+ "from": "Hit",
289
+ "mode": "list"
290
+ }
291
+ }
292
+ },
293
+ "cases": [
294
+ {
295
+ "name": "...on selects per concrete type and $type is always present",
296
+ "request": {
297
+ "ops": [
298
+ {
299
+ "id": 1,
300
+ "op": "search",
301
+ "shape": "{ ...on Book { id title } ...on Author { name } }"
302
+ }
303
+ ]
304
+ },
305
+ "frames": [
306
+ {
307
+ "id": 1,
308
+ "data": [
309
+ {
310
+ "$type": "Book",
311
+ "id": "b1",
312
+ "title": "T1"
313
+ },
314
+ {
315
+ "$type": "Author",
316
+ "name": "Ann"
317
+ }
318
+ ],
319
+ "meta": {
320
+ "cost": 1
321
+ },
322
+ "fin": true
323
+ }
324
+ ]
325
+ },
326
+ {
327
+ "name": "no shape gives each member its default view",
328
+ "request": {
329
+ "ops": [
330
+ {
331
+ "id": 1,
332
+ "op": "search"
333
+ }
334
+ ]
335
+ },
336
+ "frames": [
337
+ {
338
+ "id": 1,
339
+ "data": [
340
+ {
341
+ "$type": "Book",
342
+ "id": "b1",
343
+ "title": "T1"
344
+ },
345
+ {
346
+ "$type": "Author",
347
+ "id": "a1",
348
+ "name": "Ann"
349
+ }
350
+ ],
351
+ "meta": {
352
+ "cost": 1
353
+ },
354
+ "fin": true
355
+ }
356
+ ]
357
+ },
358
+ {
359
+ "name": "compact keeps $type on union members",
360
+ "request": {
361
+ "ops": [
362
+ {
363
+ "id": 1,
364
+ "op": "search",
365
+ "compact": true
366
+ }
367
+ ]
368
+ },
369
+ "frames": [
370
+ {
371
+ "id": 1,
372
+ "data": [
373
+ {
374
+ "$type": "Book",
375
+ "id": "b1",
376
+ "title": "T1"
377
+ },
378
+ {
379
+ "$type": "Author",
380
+ "id": "a1",
381
+ "name": "Ann"
382
+ }
383
+ ],
384
+ "fin": true
385
+ }
386
+ ]
387
+ }
388
+ ]
389
+ }