grafbase / pathfinder

The missing GraphQL IDE
https://pathfinder.dev
Mozilla Public License 2.0
127 stars 6 forks source link

Support for folders/collections #171

Open michaelbromley opened 11 months ago

michaelbromley commented 11 months ago

Context: I'm developing with GraphQL APIs daily and for the past few years have been happily using Insomnia. Pathfinder looks very promising as an alternative!

Insomnia has folders you can use to organize documents. This is a must-have for me, as I frequently need to switch between different areas of my API and to have it all organized and easy to find is essential. The current tab system is OK for a small number of documents but will not scale.

image

I'm not sure how feasible this is, but maybe you could even consider supporting the Postman collections format (https://learning.postman.com/collection-format/getting-started/structure-of-a-collection/) - that would probably encourage people to switch over if they can import their existing collections easily.

jonathanawesome commented 10 months ago

Hey there, thanks for the feature request. This is certainly something that we've thought about, for our own usage (as a plugin) and/or as a default.

Are you saving documents, there in your screenshot, or specific operations? Do they update automatically when their selection sets/arguments/etc change, or are they static? Been a while since I used Insomnia...when you load one of those saved documents/operations, is it hydrating the endpoint/headers as well? Do they represent tabs in Insomnia-world?

Would you be satisfied with local storage, or does there need to be cloud functionality here? If local storage, does it need to include exporting/importing? If so, how detailed must that be?

michaelbromley commented 10 months ago

In Insomnia, each saved "tab" such as "Create product mutation" in my screenshot is a document, i.e. it can contain multiple named operations (or a single anon one) just like in Pathfinder. I tend to just have a single operation per tab though.

The contents of the document is static, the do not update automatically in any way. To change them you need to directly type in the main operation editor pane. A tab encompasses:

image

For me local storage is totally fine, I don't need cloud sync at all. Import export only important if I need to e.g. set up a brand new laptop. Day to day I don't need it.