Open lkleuver opened 4 years ago
@lkleuver PTAL at https://github.com/OneGraph/graphiql-explorer/issues/10#issuecomment-567901798. :wink:
@lkleuver We indeed haven't implemented array support yet - definitely a fundamental omission! if you're looking to take a crack at this, it'd be a great help!
I'm taking a look at this. How do we want to annotate array inputs? Was thinking of using square brackets after the field name.
@baohouse Are you working on a pull request?
Was thinking of using square brackets after the field name.
PTAL at my vision: https://github.com/OneGraph/graphiql-explorer/issues/10#issuecomment-567901798. It's highly inspired by Chrome DevTools.
Looks like using curly braces for objects (non-leaf fields that has childs) is also a good idea. PTAL at https://github.com/OneGraph/graphiql-explorer/issues/10#issuecomment-590539831.
Also it would be really nice to visually separate the input fields (arguments) from the output (asked) fields by placing input fields into round brackets. But this may out of scope of this pull request.
@FluorescentHallucinogen Ah yes, it's a high priority for one of our customers, so, I am taking a stab at it. Thanks for pointing to the vision, I have a clear idea now. I also see where to start working https://github.com/OneGraph/graphiql-explorer/blob/2786cab7b9ede1c9846edd5d84be315cfa41a95f/src/Explorer.js#L728
@baohouse Any progress?
@FluorescentHallucinogen Yeah, I have a sense of how it all works together. I'm still far from completing it per the vision. Here's the tasklist:
@baohouse I am very interested in this. Please let me know if I can be of assistance. I am especially interested how this would integrate with custom graphql scalars (see my branch and PR #47)
@baohouse Could you please create a WIP pull request?
allow collapsing of list without removing elements (essentially hiding details, rather than default behavior of removing the field)
BTW, this is what annoys me in the Explorer. If I open rotating triangle, Explorer adds this to the query. What if I want to just see what's inside without adding this to the query? So it would be really nice to change this behavior in Explorer globally. This may out of scope of this pull request. But we should provide consistent behavior in Explorer.
add checkbox in front of field-list
What about checkboxes in front of list item fields, not in front of list field?
IMO, we should preserve leading checkboxes for "insert all child fileds" feature i.e. check all nested checkboxes at once automatically and then manually uncheck only unnecessary instead of check them only one by one manually (this is very useful for types with a large number of fields).
See detail explanation how this might works: https://github.com/OneGraph/graphiql-explorer/issues/10#issuecomment-491268985.
BTW, this implies the need of a third "indeterminate" state for checkboxes in addition to "unchecked" and "checked" (if not all child checkboxes checked).
See package
, bundlephobia
and downloads
fields on the image here: https://github.com/OneGraph/graphiql-explorer/issues/10#issuecomment-481835887.
I see this pull request grows like a snowball…
@baohouse Feel free to drop (throw out) advanced features like "duplicate element" and "reorder element by drag-and-drop".
Please let me know if I can help in some way too. ;)
IMO, we should preserve leading checkboxes for "insert all child fileds" feature i.e. check all nested checkboxes at once automatically and then manually uncheck only unnecessary instead of check them only one by one manually (this is very useful for types with a large number of fields).
Note this behaviour is currently possible (though not intuitive): ALT+Click on a field should select all properties 1 level deep (including non-leaf properties and any required arguments)
@TimLehner
Note this behaviour is currently possible (though not intuitive): ALT+Click on a field should select all properties 1 level deep (including non-leaf properties and any required arguments)
I know about this. But currently it has low feature discoverability. How users learn about this hotkey?
@FluorescentHallucinogen
I know about this. But currently it has low feature discoverability. How users learn about this hotkey?
I agree this is not well advertised or intuitive at all. Aside from reading the source I am not sure how you would be expected to discover this feature, which is a shame
It's intended. You should not be selecting all fields by default. If you know that - and the implications of it - and still want to do it, then you probably have searched enough and found out how to do so.
On Sat, Apr 25, 2020 at 6:34 AM Timothy Lehner notifications@github.com wrote:
@FluorescentHallucinogen https://github.com/FluorescentHallucinogen
I know about this. But currently it has low feature discoverability. How users learn about this hotkey?
I agree this is not well advertised or intuitive at all. Aside from reading the source I am not sure how you would be expected to discover this feature, which is a shame
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OneGraph/graphiql-explorer/issues/32#issuecomment-619380480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAITYGHXQPXN52GCUBQE4TROLRFXANCNFSM4JRVQZZQ .
@sgrove
you probably have searched enough and found out how to do so.
But it's not documented anywhere. ¯_(ツ)_/¯
If I create pull request that implements behavior described in https://github.com/OneGraph/graphiql-explorer/issues/10#issuecomment-491268985 (clicking on the rotating triangles and field names still only expand child fields without checking (inserting) them), will you merge it?
@FluorescentHallucinogen I'll work on migrating my work onto a clean branch off the master. I realized that not only I was working off an older version of the file, but also a Flow-to-Typescript translated file that I did for the purpose of dropping it into my app's codebase.
@baohouse Any news?
@baohouse Any progress? Do you need any help?
@FluorescentHallucinogen Sorry, I've been swamped with work. I don't think I'll have time to properly merge in changes. The first problem was that I had converted the GraphiQL file into Typescript for my app, and "undoing" those changes to isolate the feature-specific ones was tedious. Can I send you a copy of the file in its current state?
@baohouse
Can I send you a copy of the file in its current state?
Yes, please. You can use https://gist.github.com.
@FluorescentHallucinogen Here's the gist https://gist.github.com/baohouse/123c409cd1e4f56fa3b9a5e8859330d5
The main changes I made were to support object-based custom args, and list types (both object lists and scalar lists).
Is there any progress on this ?
Is there any progress on this?
Bumping this. @baohouse do you think you could make the snippet as a repository? What's needed for it to work completely? It seemed a bit buggy
bumping this as well - would be happy to help get this supported
@rubendinho
would be happy to help get this supported
Pull requests are welcome. See https://github.com/OneGraph/graphiql-explorer/issues/10#issuecomment-567901798 for what this might look like. ;)
Bumping this
my schema has the following input:
coordinates: [Float!]!
but it seems the explorer only looks at the leaf argument type. (unwrapInputType)Am I missing something, or is there perhaps work in progress before I start implementing it?