graphql-voyager icon indicating copy to clipboard operation
graphql-voyager copied to clipboard

Edit coords and hide some types

Open dmnd opened this issue 7 years ago • 4 comments

Thanks for creating this, it looks great!

One feature I'd appreciate is the ability to (a) drag types around, and persist the coords and (b) hide some of the types.

My use case is that I want to use this app as a way to explore my quite complex GraphQL schema. Because it's complex, it benefits from having a human lay things out nicely.

I imagine you could store a map like the following:

{
  "PersonType": {
    x: 200,
    y: 302,
    hidden: false,
  }
}

which overrides automatic layout. Then when the schema is updated, as long as the name of the type doesn't change, things should be roughly ok (maybe).

Maybe it could be possible to hide some edges too.

Do you have any such plans?

dmnd avatar Feb 22 '17 06:02 dmnd

@dmnd thanks for idea and sorry for late response.

We don't have such plans in the nearest future as graph is rendered using viz.js and it doesn't have simple ways how to implement this. We have an idea how to implement this with small efforts though. I will let you know once we verify it.

RomanHotsiy avatar Mar 09 '17 19:03 RomanHotsiy

I'll add my vote for this. I want to present my information architecture as a story and to have the graph flow represent that story. For example, I have an interface that exposes a universally unique object id with multiple attributes. The current graph places that interface far to the right. I'd like to manually move it all the way to the left and to introduce my system by explaining that every first class object is immediately accessible by an index on that object id. (hmm... might this be approached with a left<-->right swap??) As a work-round I zoom in and capture the rendered types and their immediate neighbors on individual screens which I can then present in the desired order, sort of getting me to my story.

Further, I have types with conceptual groupings that are not encoded (working on this) that can be easily communicated by dragging them near to one another on the graph.

Most importantly, let me say this... what you've built is an amazing tool that is worth a tremendous amount without any improvements at all. It saved me hours with one use and can easily keep diagrams (that would otherwise never be maintained) up-to-the-minute with changes. Huge and ongoing value!

Thanks Roman!!!

david-cheney-pd avatar Jul 23 '17 02:07 david-cheney-pd

This would be awesome, I'm currently hacking (abusing) this project to use it as an AWS architecture visualization tool, and moving types and persisting changes would be amazing. However as mentioned it might be hard to do, still looking into the viewport.ts implementation

inakianduaga avatar Feb 19 '18 22:02 inakianduaga

I don't need any manual layout coordinates, but hiding some types would be great. Any ideas on achieving just that?

peisenmann avatar Aug 15 '18 21:08 peisenmann