GraphiQL Explorer doesn’t support lists
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.
Yeah this is an issue with graphiql explorer that is yet to be addressed:
https://github.com/OneGraph/graphiql-explorer/issues/32
As for why it works without a list:
https://spec.graphql.org/draft/#sec-List.Input-Coercion
Yeah this is an issue with graphiql explorer that is yet to be addressed:
As for why it works without a list:
https://spec.graphql.org/draft/#sec-List.Input-Coercion
Thanks for the reference link and fast response.