Skip to content

Commit

Permalink
[base] Don't include results on document store listeners (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge authored Feb 6, 2018
1 parent 5c8eef1 commit f1701b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@sanity/base/src/datastores/document/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function fetchQuerySnapshot(query, params) {

const serverConnection = {
byId(id) {
return Observable.from(client.listen('*[_id == $id]', {id: id}, {events: ['welcome', 'mutation']}))
return Observable.from(client.listen('*[_id == $id]', {id: id}, {includeResult: false, events: ['welcome', 'mutation']}))
.concatMap(event => {
return (event.type === 'welcome')
? Observable.from(fetchDocumentSnapshot(id))
Expand All @@ -33,7 +33,7 @@ const serverConnection = {
},

query(query, params) {
return Observable.from(client.observable.listen(query, params || {}, {events: ['welcome', 'mutation']}))
return Observable.from(client.observable.listen(query, params || {}, {includeResult: false, events: ['welcome', 'mutation']}))
.concatMap(event => {
return (event.type === 'welcome')
? Observable.from(fetchQuerySnapshot(query, params))
Expand Down

0 comments on commit f1701b5

Please sign in to comment.