hasura / hasura/graphql-engine

Allowlist Bug: including an unused fragment results in whole query being blocked (2.0.0 alpha v6)?

Open
#6,750 1 comment 0 reactions 0 assignees View on GitHub
a/api a/api/graphql support/needs-triage
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

Hi, I have an allowlist operation that looks like:

```
query exampleQuery($where: a_bool_exp!) {
a(where: $where) {
...frag
b {
id
}
}
}

fragment frag on a {
id
}
```

When I include a fragment for b, it seems to get blocked even if I'm not using it:

```
query exampleQuery($where: a_bool_exp!) {
a(where: $where) {
...frag
b {
id
}
}
}

fragment frag on a {
id
}
fragment frag2 on b {
id
}
```

Exact same fields. The mere insertion of the fragment without even using it seems to get the whole query blocked. Any idea? Literally just this 1 query of 100+.

Not sure if this related: https://github.com/hasura/graphql-engine/issues/5156

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.