graphql-framework-experiment
graphql-framework-experiment copied to clipboard
Support nodes shorthand in connections
Perceived Problem
- relay connections spec can be verbose for clients
Ideas / Proposed Solution(s)
-
a lot of benefit can be maintained but with less verbosity by dropping edges
query { products(first: 100) { edges { node { name } } } } # Excerpt From: Marc-Andre Giroux. “Production Ready GraphQL.”
to:
query { products(first: 100) { nodes { name } } } # Excerpt From: Marc-Andre Giroux. “Production Ready GraphQL.”
-
allow api authors to choose between three styles:
-
nodes
andedges
- just
nodes
- just
edges
-
Looks like an option to include the nodes
field was added: https://nexus.js.org/docs/plugin-connection#including-a-nodes-field