You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/query/src/graphql/__snapshots__/graphql.historical.test.ts.snap
+17-6Lines changed: 17 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
3
exports[`GraphqlHistorical to filter historical items when ordering 1`] =`
4
-
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), '@listings'::text, (with __local_2__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_3__."_id"), 'priceAmount'::text, ((__local_3__."price_amount"))::text))) as "@nodes" from (select
4
+
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), '@listings'::text, (with __local_2__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_3__."_id"), 'priceAmount'::text, ((__local_3__."price_amount"))::text))) as "@nodes" from (select
5
5
__local_3__.*
6
6
from "subquery_2"."listings" as __local_3__
7
7
8
8
where (__local_3__."item_id" = __local_1__."id") and (__local_3__._block_range @> $1::bigint) and (__local_3__._block_range @> $1::bigint) and (TRUE) and (TRUE)
9
9
order by __local_3__."_id" ASC
10
10
11
-
) __local_3__), __local_4__ as (select json_agg(to_json(__local_2__)) as data from __local_2__) select json_build_object('data'::text, coalesce((select __local_4__.data from __local_4__), '[]'::json)) )))) as "@nodes" from (select
11
+
) __local_3__), __local_4__ as (select json_agg(to_json(__local_2__)) as data from __local_2__) select json_build_object('data'::text, coalesce((select __local_4__.data from __local_4__), '[]'::json)) )))) as "@nodes" from (select
12
12
__local_1__.*
13
13
from "subquery_2"."items" as __local_1__
14
14
@@ -19,7 +19,7 @@ order by __local_1__."last_traded_price_amount" ASC,__local_1__."_id" ASC
19
19
`;
20
20
21
21
exports[`GraphqlHistorical to filter historical nested (backward) 1`] =`
22
-
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), 'id'::text, (__local_1__."id")))) as "@nodes" from (select
22
+
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), 'id'::text, (__local_1__."id")))) as "@nodes" from (select
23
23
__local_1__.*
24
24
from "subquery_2"."items" as __local_1__
25
25
@@ -30,7 +30,7 @@ order by __local_1__."_id" ASC
30
30
`;
31
31
32
32
exports[`GraphqlHistorical to filter historical nested (forward) 1`] =`
33
-
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), 'id'::text, (__local_1__."id")))) as "@nodes" from (select
33
+
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), 'id'::text, (__local_1__."id")))) as "@nodes" from (select
34
34
__local_1__.*
35
35
from "subquery_2"."listings" as __local_1__
36
36
@@ -45,14 +45,14 @@ order by __local_1__."_id" ASC
45
45
`;
46
46
47
47
exports[`GraphqlHistorical to filter historical top level 1`] =`
48
-
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), 'id'::text, (__local_1__."id"), '@listings'::text, (with __local_2__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_3__."_id"), 'id'::text, (__local_3__."id")))) as "@nodes" from (select
48
+
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), 'id'::text, (__local_1__."id"), '@listings'::text, (with __local_2__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_3__."_id"), 'id'::text, (__local_3__."id")))) as "@nodes" from (select
49
49
__local_3__.*
50
50
from "subquery_2"."listings" as __local_3__
51
51
52
52
where (__local_3__."item_id" = __local_1__."id") and (__local_3__._block_range @> $1::bigint) and (__local_3__._block_range @> $1::bigint) and (TRUE) and (TRUE)
53
53
order by __local_3__."_id" ASC
54
54
55
-
) __local_3__), __local_4__ as (select json_agg(to_json(__local_2__)) as data from __local_2__) select json_build_object('data'::text, coalesce((select __local_4__.data from __local_4__), '[]'::json)) )))) as "@nodes" from (select
55
+
) __local_3__), __local_4__ as (select json_agg(to_json(__local_2__)) as data from __local_2__) select json_build_object('data'::text, coalesce((select __local_4__.data from __local_4__), '[]'::json)) )))) as "@nodes" from (select
56
56
__local_1__.*
57
57
from "subquery_2"."items" as __local_1__
58
58
@@ -65,3 +65,14 @@ order by __local_1__."_id" ASC
65
65
where (__local_1__._block_range @> $1::bigint) and ((exists(select 1 from "subquery_2"."listings" as __local_5__ where (__local_5__."item_id" = __local_1__."id") and (__local_5__._block_range @> $1::bigint))))
66
66
) as "aggregates" "
67
67
`;
68
+
69
+
exports[`should filter items by blockRange 1`] =`
70
+
"with __local_0__ as (select to_json((json_build_object('__identifiers'::text, json_build_array(__local_1__."_id"), 'id'::text, (__local_1__."id"), 'createdAtBlockHeight'::text, ((__local_1__."created_at_block_height"))::text))) as "@nodes" from (select
71
+
__local_1__.*
72
+
from "subquery_2"."items" as __local_1__
73
+
74
+
where (__local_1__._block_range @> int8range($1, $2, '[]')) and (TRUE) and (TRUE)
75
+
order by __local_1__."_id" ASC
76
+
77
+
) __local_1__), __local_2__ as (select json_agg(to_json(__local_0__)) as data from __local_0__) select coalesce((select __local_2__.data from __local_2__), '[]'::json) as "data" "
0 commit comments