Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Graphql.js now supports query merging (github.com/f)
2 points by fka on Dec 11, 2018 | hide | past | favorite | 1 comment


Isn't the problem this is trying to solve what GraphQL already solves? Instead of two different queries (one for the master record, one for the details):

  {
    post(id: $id) {
      id
      title
      text
    }
  }


  {
    commentsOfPost: comments(postId: $postId) {
      comment
      owner {
        name
      }
    }
  }
Shouldn't it just be

  {
    post(id: $id) {
      id
      title
      text,
      comments {
          comment
          owner {
              name
          }
      }
    }
  }

?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: