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

[Proposal] Return nested field directly in alias #317

Open
shinneider opened this issue Apr 18, 2024 · 0 comments
Open

[Proposal] Return nested field directly in alias #317

shinneider opened this issue Apr 18, 2024 · 0 comments

Comments

@shinneider
Copy link

shinneider commented Apr 18, 2024

Hello, i have a new proposal, allow to return a value of nested field in an alias

it`s a very good if you have a lot of nested fields and a client only need a field inside.
example:

Data:

{
   "id": 1,
   "nested_one": {
     "id": 1,
     "nested_two": {
         "id": 1
      }
   }
}

Today: query={nested1: nested_one{id, nested2: nested_two{id}}} return

{
  "nested1": {
     "id": 1,
     "nested2": {
         "id": 1
      }
   }
}

Proposal query={nested1: nested_one__id, nested2: nested_one__nested_two__id} or maybe a dotted version query={nested1: nested_one.id, nested2: nested_one.nested_two.id} and return

{
  "nested1": 1
  "nested2": 1
}
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

1 participant