@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,440 @@
1
+ {
2
+ "name": "Loads shared by every op of a batch (spec 03 s2)",
3
+ "schema": "\nentity Author { id: ID name: String }\nentity Book { id: ID title: String author: Author }\nquery book(id: ID): Book?\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
+ "Author": {
181
+ "kind": "entity",
182
+ "name": "Author",
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": "name",
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
+ "Book": {
211
+ "kind": "entity",
212
+ "name": "Book",
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": "title",
228
+ "type": {
229
+ "kind": "named",
230
+ "name": "String",
231
+ "nullable": false
232
+ },
233
+ "args": [],
234
+ "annotations": [],
235
+ "ordinal": 2
236
+ },
237
+ {
238
+ "name": "author",
239
+ "type": {
240
+ "kind": "named",
241
+ "name": "Author",
242
+ "nullable": false
243
+ },
244
+ "args": [],
245
+ "annotations": [],
246
+ "ordinal": 3
247
+ }
248
+ ],
249
+ "implements": []
250
+ }
251
+ },
252
+ "ops": {
253
+ "book": {
254
+ "kind": "query",
255
+ "name": "book",
256
+ "args": [
257
+ {
258
+ "name": "id",
259
+ "type": {
260
+ "kind": "named",
261
+ "name": "ID",
262
+ "nullable": false
263
+ },
264
+ "annotations": []
265
+ }
266
+ ],
267
+ "returns": {
268
+ "kind": "named",
269
+ "name": "Book",
270
+ "nullable": true
271
+ },
272
+ "throws": [],
273
+ "emits": [],
274
+ "annotations": []
275
+ }
276
+ },
277
+ "views": {}
278
+ },
279
+ "data": {
280
+ "Author": [
281
+ {
282
+ "id": "a1",
283
+ "name": "Ann"
284
+ }
285
+ ],
286
+ "Book": [
287
+ {
288
+ "id": "b1",
289
+ "title": "T1",
290
+ "authorId": "a1"
291
+ },
292
+ {
293
+ "id": "b2",
294
+ "title": "T2",
295
+ "authorId": "a1"
296
+ }
297
+ ]
298
+ },
299
+ "resolvers": {
300
+ "Query": {
301
+ "book": {
302
+ "from": "Book",
303
+ "where": {
304
+ "id": "$args.id"
305
+ },
306
+ "mode": "one"
307
+ }
308
+ },
309
+ "fields": {
310
+ "Book": {
311
+ "author": {
312
+ "from": "Author",
313
+ "key": "authorId",
314
+ "match": "id",
315
+ "mode": "one"
316
+ }
317
+ }
318
+ }
319
+ },
320
+ "cases": [
321
+ {
322
+ "name": "two ops that need the same row's author load it once",
323
+ "request": {
324
+ "ops": [
325
+ {
326
+ "id": 1,
327
+ "op": "book",
328
+ "args": {
329
+ "id": "b1"
330
+ },
331
+ "shape": "{ id author { name } }"
332
+ },
333
+ {
334
+ "id": 2,
335
+ "op": "book",
336
+ "args": {
337
+ "id": "b1"
338
+ },
339
+ "shape": "{ title author { name } }"
340
+ }
341
+ ]
342
+ },
343
+ "frames": [
344
+ {
345
+ "id": 1,
346
+ "data": {
347
+ "$type": "Book",
348
+ "id": "b1",
349
+ "author": {
350
+ "$type": "Author",
351
+ "name": "Ann"
352
+ }
353
+ },
354
+ "meta": {
355
+ "cost": 2
356
+ },
357
+ "fin": true
358
+ },
359
+ {
360
+ "id": 2,
361
+ "data": {
362
+ "$type": "Book",
363
+ "title": "T1",
364
+ "author": {
365
+ "$type": "Author",
366
+ "name": "Ann"
367
+ }
368
+ },
369
+ "meta": {
370
+ "cost": 2
371
+ },
372
+ "fin": true
373
+ }
374
+ ],
375
+ "calls": {
376
+ "Query.book": 2,
377
+ "Book.author": 1
378
+ }
379
+ },
380
+ {
381
+ "name": "guard: ops about different rows load each of them",
382
+ "request": {
383
+ "ops": [
384
+ {
385
+ "id": 1,
386
+ "op": "book",
387
+ "args": {
388
+ "id": "b1"
389
+ },
390
+ "shape": "{ id author { name } }"
391
+ },
392
+ {
393
+ "id": 2,
394
+ "op": "book",
395
+ "args": {
396
+ "id": "b2"
397
+ },
398
+ "shape": "{ id author { name } }"
399
+ }
400
+ ]
401
+ },
402
+ "frames": [
403
+ {
404
+ "id": 1,
405
+ "data": {
406
+ "$type": "Book",
407
+ "id": "b1",
408
+ "author": {
409
+ "$type": "Author",
410
+ "name": "Ann"
411
+ }
412
+ },
413
+ "meta": {
414
+ "cost": 2
415
+ },
416
+ "fin": true
417
+ },
418
+ {
419
+ "id": 2,
420
+ "data": {
421
+ "$type": "Book",
422
+ "id": "b2",
423
+ "author": {
424
+ "$type": "Author",
425
+ "name": "Ann"
426
+ }
427
+ },
428
+ "meta": {
429
+ "cost": 2
430
+ },
431
+ "fin": true
432
+ }
433
+ ],
434
+ "calls": {
435
+ "Query.book": 2,
436
+ "Book.author": 2
437
+ }
438
+ }
439
+ ]
440
+ }
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@rayfold/conformance",
3
+ "version": "0.1.0",
4
+ "description": "Rayfold conformance fixtures and harness: the shared cases every Rayfold implementation must pass.",
5
+ "keywords": [
6
+ "rayfold",
7
+ "api",
8
+ "protocol",
9
+ "conformance",
10
+ "testing",
11
+ "fixtures"
12
+ ],
13
+ "license": "Apache-2.0",
14
+ "homepage": "https://eddyboutros.github.io/rayfold/",
15
+ "bugs": {
16
+ "url": "https://github.com/eddyboutros/rayfold/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/eddyboutros/rayfold.git",
21
+ "directory": "conformance"
22
+ },
23
+ "type": "module",
24
+ "engines": {
25
+ "node": ">=22"
26
+ },
27
+ "main": "./fixture.js",
28
+ "types": "./fixture.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./fixture.d.ts",
32
+ "default": "./fixture.js"
33
+ },
34
+ "./package.json": "./package.json",
35
+ "./fixtures/*": "./fixtures/*"
36
+ },
37
+ "dependencies": {
38
+ "@rayfold/schema": "^0.1.0",
39
+ "@rayfold/server": "^0.1.0"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ }
44
+ }