Skip to content

Commit cab94f2

Browse files
committed
update tests
1 parent 7d3b205 commit cab94f2

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

test/expected/function_calls.out

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,18 +2611,13 @@ begin;
26112611
create function returns_one_column_null_account()
26122612
returns account language sql stable
26132613
as $$ select id, email, name from account where id = 2; $$;
2614-
create function returns_all_columns_null_account()
2615-
returns account language sql stable
2616-
as $$ select id, email, name from account where id is null; $$;
26172614
create function returns_null_account()
26182615
returns account language sql stable
26192616
as $$ select id, email, name from account where id = 9; $$;
26202617
insert into account(id, email, name)
26212618
values
26222619
(1, 'aardvark@x.com', 'aardvark'),--all columns non-null
26232620
(2, 'bat@x.com', null);--mixed: some null, some non-null
2624-
--(null, null, null);--all columns null
2625-
-- comment on table account is e'@graphql({"totalCount": {"enabled": true}})';
26262621
select jsonb_pretty(graphql.resolve($$
26272622
query {
26282623
returnsAllColumnsNonNullAccount {
@@ -2671,29 +2666,7 @@ begin;
26712666
}
26722667
(1 row)
26732668

2674-
-- With current implementation we can't distinguish between
2675-
-- when all columns of a composite type are null and when
2676-
-- the composite type itself is null. In both these cases
2677-
-- the result will be null for the top-level field.
2678-
select jsonb_pretty(graphql.resolve($$
2679-
query {
2680-
returnsAllColumnsNullAccount {
2681-
id
2682-
email
2683-
name
2684-
__typename
2685-
}
2686-
}
2687-
$$));
2688-
jsonb_pretty
2689-
----------------------------------------------
2690-
{ +
2691-
"data": { +
2692-
"returnsAllColumnsNullAccount": null+
2693-
} +
2694-
}
2695-
(1 row)
2696-
2669+
-- When no record is found, the top level field becomes null
26972670
select jsonb_pretty(graphql.resolve($$
26982671
query {
26992672
returnsNullAccount {

test/expected/function_return_view_has_pkey.out

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,4 @@ begin;
118118
}
119119
(1 row)
120120

121-
122121
rollback;

0 commit comments

Comments
 (0)