linksplatform/Data.Doublets.Gql

Support flattening the data

Opened this issue · 0 comments

This task depends on #8

It can also be useful to use resolver to flatten the structure:

{
  from_string
  to_string
}

instead of

{
  from { string }
  to { string }
}

It will make possible to do something like this with aliases:

{
  TrackName: from_string
  DownloadsCount: to_string
}

And the user will be able to get JSON with this structure:

{
  "TrackName": "GANGNAM STYLE",
  "DownloadsCount": "4163140300"
}

But, this can overcomplicate the API, so https://github.com/APIs-guru/graphql-lodash can be a better client-side solution.