Explore possibility of generic types
As projects like Relay have shown, it's relatively common to repeat the same generic structures of types multiple times within a project. In the case of Relay, I'm talking about Connections. The GraphQL definition language already has explicit support for one particular form of generic type, arrays: ```graphql type Foo { id: ID! bars: [Bar] } ``` I'd like to start discussion about being able to do something similar for user-defined structures: ```graphql generic ConnectionEdge<T> { node: T cursor: String } generic Connection<T> { edges: ConnectionEdge<T> pageInfo: PageInfo } type Foo { id: ID! bars: Connection<Bar> } ``` The overall goal is to reduce the amount of boilerplate in creating schemas with repetitive structures.
Posted by AndrewIngram on Jun 28, 2016, 3:02 PM
Tags
Related issues
- some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
- I think of this as the kiosk economy.
- What a goofy comment.
- There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
- Compose support in WSLc
- [RFC] Roadmap to v2.0
Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments
support (Other)
some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
I think of this as the kiosk economy.
What a goofy comment.
There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
Compose support in WSLc
[RFC] Roadmap to v2.0
[Feature]: Add TurboQuant Support for KV Cache Quantization
Support for AGENTS.md and .agents/skills/, the community has been asking since August 2025
Explore possibility of generic types
As projects like Relay have shown, it's relatively common to repeat the same generic structures of types multiple times within a project. In the case of Relay, I'm talking about Connections. The GraphQL definition language already has explicit support for one particular form of generic type, arrays: ```graphql type Foo { id: ID! bars: [Bar] } ``` I'd like to start discussion about being able to do something similar for user-defined structures: ```graphql generic ConnectionEdge<T> { node: T cursor: String } generic Connection<T> { edges: ConnectionEdge<T> pageInfo: PageInfo } type Foo { id: ID! bars: Connection<Bar> } ``` The overall goal is to reduce the amount of boilerplate in creating schemas with repetitive structures.
Comments (0)
No comments yet. Start the discussion.