Open
Description
Describe the bug
A query which doesn't specify any subfields on a non-scalar field should be rejected.
To Reproduce
Run the following SQL:
create table account(
id serial primary key,
email varchar(255) not null
);
select jsonb_pretty(graphql.resolve($$
query {
accountCollection
}
$$));
Observe that the above GraphQL query returns:
jsonb_pretty
-----------------------------------
{ +
"data": { +
"accountCollection": null+
} +
}
(1 row)
Expected behavior
The query should be rejected with an error message because the accountCollection
field has id
and email
sub-fields.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions:
- pg_graphql commit ref: 8e95a72