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

XxxConnection / XxxEdges #3

Closed
MartinLorensen opened this issue Feb 19, 2016 · 5 comments
Closed

XxxConnection / XxxEdges #3

MartinLorensen opened this issue Feb 19, 2016 · 5 comments

Comments

@MartinLorensen
Copy link

While GraphQL does not specify any standard for doing paging/collections, it seems that a convention is to have a XxxConnection-type and possilby a XxxEdge-type, which always contains a specific sets of fields and reference an instance of Xxx.

With larger graphs with many collections with paging, the Connect/Edge-types clutter the graph quite a bit. It would be nice to have a way of replacing any of these paging classes with a "one to many" connection in the dot-graph. This could be indicated with a star either at the arrow or prefixed/suffixed the connection name.

As there is no specification, this might be a bit tricky to get right, matching might have to be a bit flexible - and this might be a feature that is not on by default.

  • Facebooks convension seems to be XxxConnection and XxxConnectionEdge.
  • graphql-dotnet seems Edge-types has no incoming edges, only an outgoing connection to the underlying type. From the example dataset I can see the Connection-type also has a connection to the Edge-type (which sounds reasonable).
@Macroz
Copy link
Owner

Macroz commented Feb 19, 2016

Do you have a suitable example file? I have not so far had a need to filter out edges, but I can see how that would be useful. Thanks.

@MartinLorensen
Copy link
Author

I just found that the specification - it is not in GraphQL, but rather a relay-thing found here.

A rather "simplified" version of our current model is attached (might not be 100% valid GraphQL-metadata, but the tool passes it and produces a graph illustrating the "problem").

@Macroz
Copy link
Owner

Macroz commented Feb 23, 2016

Ok, how about graphqlviz-0.5.0-preview.zip? Does it work for you?

@arunlals
Copy link

arunlals commented Mar 3, 2016

fdgdfgfd
df
gdf

@MartinLorensen
Copy link
Author

That works perfectly. Thanks a lot!

BTW: Sorry for the delay. Some how i missed the original notification of your post - so it wasn't until I received the comment from "arunappulal" i noted the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants