Skip to content

Commit

Permalink
add test for mixed case null defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Apr 9, 2024
1 parent 7a7b1a7 commit 046ebc7
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
43 changes: 43 additions & 0 deletions test/expected/function_calls_default_args.out
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,17 @@ begin;
}
(1 row)

create function defaul_null_mixed_case(
a smallint default null,
b integer default NULL,
c integer default NuLl
)
returns text language plpgsql immutable
as $$
begin
return 'mixed case';
end;
$$;
select jsonb_pretty(
graphql.resolve($$
query IntrospectionQuery {
Expand Down Expand Up @@ -250,6 +261,38 @@ begin;
], +
"name": "bothArgsOptional" +
}, +
{ +
"args": [ +
{ +
"name": "a", +
"type": { +
"kind": "SCALAR", +
"name": "Int", +
"ofType": null +
}, +
"defaultValue": null +
}, +
{ +
"name": "b", +
"type": { +
"kind": "SCALAR", +
"name": "Int", +
"ofType": null +
}, +
"defaultValue": null +
}, +
{ +
"name": "c", +
"type": { +
"kind": "SCALAR", +
"name": "Int", +
"ofType": null +
}, +
"defaultValue": null +
} +
], +
"name": "defaulNullMixedCase" +
}, +
{ +
"args": [ +
{ +
Expand Down
12 changes: 12 additions & 0 deletions test/sql/function_calls_default_args.sql
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ begin;
}
$$));

create function defaul_null_mixed_case(
a smallint default null,
b integer default NULL,
c integer default NuLl
)
returns text language plpgsql immutable
as $$
begin
return 'mixed case';
end;
$$;

select jsonb_pretty(
graphql.resolve($$
query IntrospectionQuery {
Expand Down

0 comments on commit 046ebc7

Please sign in to comment.