tqwewe / solid-urql

Urql support for Solid JS projects.
https://www.npmjs.com/package/solid-urql
MIT License
35 stars 4 forks source link

Update createQuery.ts #2

Closed kidqueb closed 2 years ago

kidqueb commented 2 years ago

Current the types are incorrect when we default to the first key within the response.data object.

Another reason we dont want to default to the first key is it's possible for a query to have multiple top level queries that wouldnt be accessible with this default.

Ex:

query {
  user1: user(id: 1) { id }
  user2: user(id: 2) { id }
}
kidqueb commented 2 years ago

@tqwewe 👋

tqwewe commented 2 years ago

Hi @kidqueb thanks for the bump! I don't have a lot of time to test this out thoroughly, but the change seems quite small so I'll go ahead and merge and publish as a new version

tqwewe commented 2 years ago

Published as version 0.2.0