graphile / graphile/crystal

GraphiQL Explorer doesn’t support lists

Open
#2,283 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12.9k
Forks
625
Avg merge
5h 23m
Merged PRs (30d)
24

Description

Dear Graphile Team,

I stumbled upon the following behavior in an inherited project. That doesn't seem directly logical to me. In any case, the whole thing is already very cool and, as promised, super fast.
thanks!

3 Queries - quite self explaining.
That's not how it do not work as expected:

```
query MyQueryfails {
files(
filter: {or: {mimeType: {like: "%png%"}, or: {mimeType: {like: "%jpeg%"}}}}
) {
nodes {
codec
bitrate
contentSize
mimeType
}
}
}
```

Here's is how it works:

```
query MyQueryworks {
files(
filter: {or: [{mimeType: {like: "%png%"}},{mimeType: {like: "%jpeg%"}}]}
) {
nodes {
codec
bitrate
contentSize
mimeType
}
}
}
```

so far so good

But why is it working again?

```
query WhyIstheQueryWorking {
files(
filter: {or: {contentSize: {greaterThan: 70000}, or: {contentSize: {lessThan: 80000}}}}
) {
nodes {
codec
bitrate
contentSize
mimeType
}
}
}
```

Finally, this beautiful automatically generated GUI also seems to have trouble with the array in the or option.

![image](https://github.com/user-attachments/assets/074f2eb3-0b6c-47cb-9e0a-52d5e2cb76d3)

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.