graphql / graphql/graphql-spec

Support for Tuples

Open
#534 17 comments 80 reactions 0 assignees View on GitHub
👻 Needs Champion 💭 Strawman (RFC 0)
Dominant language
JavaScript
Stars
14.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I work with a datatype, [mobiledoc cards](https://github.com/bustle/mobiledoc-kit/blob/master/MOBILEDOC.md), that's represented as a tuple of a string followed by an object. Currently, to make it work in graphql I need to denormalize it to an object, then normalize to a tuple, and so on back and forth between our backend and frontend. Ideally I'd like a way to represent that the data structure as a tuple.

I would like to be able to do the following
```
type CardPayload {
foo: String!
bar: Int!
}

type Content {
cards: [String!, CardPayload!]
}

query {
content {
cards [name, { foo }]
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.