feat(gql): adds company and avatar to StreamCollaborator
This commit is contained in:
+41
-50
@@ -1,53 +1,44 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"es2020": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 11
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"modules/*/tests/*",
|
||||
"node_modules/*",
|
||||
"frontend/*"
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"es2020": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 11
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"modules/*/tests/*",
|
||||
"node_modules/*",
|
||||
"frontend/*",
|
||||
"*.graphql"
|
||||
],
|
||||
"rules": {
|
||||
"arrow-spacing": [
|
||||
2,
|
||||
{
|
||||
"before": true,
|
||||
"after": true
|
||||
}
|
||||
],
|
||||
"rules": {
|
||||
"arrow-spacing": [
|
||||
2,
|
||||
{
|
||||
"before": true,
|
||||
"after": true
|
||||
}
|
||||
],
|
||||
"array-bracket-spacing": [
|
||||
2,
|
||||
"always"
|
||||
],
|
||||
"block-spacing": [
|
||||
2,
|
||||
"always"
|
||||
],
|
||||
"camelcase": [
|
||||
1,
|
||||
{
|
||||
"properties": "always"
|
||||
}
|
||||
],
|
||||
"space-in-parens": [
|
||||
2,
|
||||
"always"
|
||||
],
|
||||
"keyword-spacing": 2,
|
||||
"semi": "off",
|
||||
"indent": [
|
||||
"error",
|
||||
2
|
||||
],
|
||||
"space-unary-ops": [
|
||||
2, {
|
||||
"words": true,
|
||||
"nonwords": false
|
||||
}]
|
||||
}
|
||||
"array-bracket-spacing": [2, "always"],
|
||||
"block-spacing": [2, "always"],
|
||||
"camelcase": [
|
||||
1,
|
||||
{
|
||||
"properties": "always"
|
||||
}
|
||||
],
|
||||
"space-in-parens": [2, "always"],
|
||||
"keyword-spacing": 2,
|
||||
"semi": "off",
|
||||
"indent": ["error", 2],
|
||||
"space-unary-ops": [
|
||||
2,
|
||||
{
|
||||
"words": true,
|
||||
"nonwords": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*.graphql
|
||||
@@ -32,6 +32,8 @@ type StreamCollaborator {
|
||||
id: String!
|
||||
name: String!
|
||||
role: String!
|
||||
company: String
|
||||
avatar: String
|
||||
}
|
||||
|
||||
type StreamCollection {
|
||||
|
||||
@@ -140,10 +140,10 @@ module.exports = {
|
||||
|
||||
async getStreamUsers( { streamId } ) {
|
||||
let query =
|
||||
Acl( ).columns( { role: 'stream_acl.role' }, 'id', 'name' ).select( )
|
||||
Acl( ).columns( { role: 'stream_acl.role' }, 'id', 'name', 'company', 'avatar' ).select( )
|
||||
.where( { resourceId: streamId } )
|
||||
.rightJoin( 'users', { 'users.id': 'stream_acl.userId' } )
|
||||
.select( 'stream_acl.role', 'name', 'id' )
|
||||
.select( 'stream_acl.role', 'name', 'id', 'company', 'avatar' )
|
||||
.orderBy( 'stream_acl.role' )
|
||||
|
||||
return await query
|
||||
|
||||
Reference in New Issue
Block a user