Releases: mrspartak/hasura-om
Releases · mrspartak/hasura-om
Deps version bumps
Deps version bumps
Deps version bumps
Deps version bumps
Security bump try #2
Security bump
Pass hasura session vars to query/mutation
This release allows you to pass headers to special requests. For example if you want to check user's permissions etc.
orm.query({
message: {
insert: {
objects: {
chat_id: 1,
message: 'hey'
}
}
}
}, { getFirst: true }, {
headers: {
'X-Hasura-User-ID': 1,
'X-Hasura-Role': 'user',
}
})
Renamed subscribeToMore - queryAndSubscribe
Because it is a query and then subscribe to get immediate data
Hasura:subscribeToMore
Under the hood it makes usual graphql request and then subscribing to new data, skipping first response.
const unsubscribe = this.$orm.subscribeToMore({
project: {
fragment: 'list'
}
}, ([err, response]) => {
//do stuff
}, { skipFirst: false }) //skipFirst = false means you also get first result from subscription
webSocketImpl for broser support
To subscribe in browser user
const orm = new Hasura({
...,
wsConnectionSettings: {
webSocketImpl: WebSocket
}
})