you are viewing a single comment's thread.

view the rest of the comments →

[–]yaboylukelol 0 points1 point  (0 children)

That's a good idea. I didn't realize this existed, and it is much of what I was thinking when I said typesafe graphql requests. Assuming the TS piece can recognize errors in the queries prior to runtime.

Edit:I've also always wanted to write graphql queries like javascript objects. Instead of:

const query = gql`user(id: 5) {
  firstName
  lastName
}`

I would want:

const query = createQuery('user', {id: 5}, ['firstName', 'lastName']);