helios1138/graphql-typed-client

add alternative chain-query syntax based on Proxy

helios1138 opened this issue · 0 comments

ability to write something like

await client.query
  .search({ query: 'graphql', type: SearchType.REPOSITORY, first: 5 })
  .nodes
  .on_Repository({
    name: 1,
  })
  .execute()

as alternative to

await client.query({
  search: [{ query: 'graphql', type: SearchType.REPOSITORY, first: 5 }, {
    nodes: {
      on_Repository: {
        name: 1,
      },
    },
  }],
})

exact synthax subject to change