Files
speckle-server/packages/frontend/src/graphql/streams.js
T
2022-03-29 16:30:49 +03:00

45 lines
655 B
JavaScript

import gql from 'graphql-tag'
/**
* Common stream fields when querying for streams
*/
export const COMMON_STREAM_FIELDS = gql`
fragment CommonStreamFields on Stream {
id
name
description
role
isPublic
createdAt
updatedAt
collaborators {
id
name
company
avatar
role
}
commits(limit: 1) {
totalCount
}
branches {
totalCount
}
favoritedDate
favoritesCount
}
`
/**
* Retrieve a single stream
*/
export const StreamQuery = gql`
query Stream($id: String!) {
stream(id: $id) {
...CommonStreamFields
}
}
${COMMON_STREAM_FIELDS}
`