Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphiQL Explorer doesn’t support lists #2283

Open
geraldurbas opened this issue Dec 18, 2024 · 2 comments
Open

GraphiQL Explorer doesn’t support lists #2283

geraldurbas opened this issue Dec 18, 2024 · 2 comments

Comments

@geraldurbas
Copy link

geraldurbas commented Dec 18, 2024

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

@github-project-automation github-project-automation bot moved this to 🌳 Triage in V5.0.0 Dec 18, 2024
@benjie
Copy link
Member

benjie commented Dec 18, 2024

Yeah this is an issue with graphiql explorer that is yet to be addressed:

OneGraph/graphiql-explorer#32

As for why it works without a list:

https://spec.graphql.org/draft/#sec-List.Input-Coercion

@benjie benjie changed the title An unexpected behavior of PostgaphiQL, maybe bug GraphiQL Explorer doesn’t support lists Dec 18, 2024
@geraldurbas
Copy link
Author

Yeah this is an issue with graphiql explorer that is yet to be addressed:

OneGraph/graphiql-explorer#32

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.

@benjie benjie removed this from V5.0.0 Dec 23, 2024
@benjie benjie added this to V5.X Dec 23, 2024
@github-project-automation github-project-automation bot moved this to 🌳 Triage in V5.X Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🌳 Triage
Development

No branches or pull requests

2 participants