This commit is contained in:
Alan Rynne 2021-11-03 16:56:41 +01:00
Родитель faac4ee821
Коммит 92a1788364
2 изменённых файлов: 0 добавлений и 13 удалений

Просмотреть файл

@ -50,17 +50,6 @@ export const streamSearchQuery = `
}
}`
export const streamObjectQuery = `query($streamId: String!, $objectId: String!) {
stream(id: $streamId){
object(id: $objectId){
totalChildrenCount
id
speckleType
data
}
}
}`
export const latestStreamsQuery = `query {
streams(limit: 10){
cursor

Просмотреть файл

@ -88,8 +88,6 @@ export const searchStreams = (e) => speckleFetch(streamSearchQuery, {searchText:
// Get commits related to a specific stream, allows for pagination by passing a cursor
export const getStreamCommits = (streamId, itemsPerPage, cursor) => speckleFetch(streamCommitsQuery, {id: streamId, cursor, limit: itemsPerPage})
export const getStreamObject = (streamId, objectId) => speckleFetch(streamObjectQuery, {streamId, objectId}).then(res => res.data?.stream?.object?.data)
export const getObject = (streamId, objectId) => speckleFetch(streamObjectQuery, {streamId, objectId})
export const getStreams = () => speckleFetch(latestStreamsQuery).then(res => res.data?.streams)