Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Invalid query is not rejected

Aperta
#412 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@olirice ci sta già lavorando.

Dal 6/9/2023.

  • #647 di @apoorva-01 — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

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:

Lingua principale
Rust
Stelle
3.4k
Fork
143
Merge medio
4h 47m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di supabase/pg_graphql

Tutte le issue di supabase/pg_graphql

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.