Skip to content

Commit 2136f23

Browse files
authored
Merge branch 'master' into feat/daily-affected
2 parents 5a6997d + 67cfbc2 commit 2136f23

3 files changed

Lines changed: 15 additions & 12 deletions

File tree

src/resolvers/project.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ module.exports = {
2020
/**
2121
* Returns project's Model
2222
* @param {ResolverObj} _obj
23-
* @param {String} id - project id
23+
* @param {String} projectId - project id
2424
* @param {ContextFactories} factories - factories for working with models
2525
* @return {Promise<ProjectDBScheme>}
2626
*/
27-
async project(_obj, { id }, { factories }) {
28-
return factories.projectsFactory.findById(id);
27+
async project(_obj, { projectId }, { factories }) {
28+
return factories.projectsFactory.findById(projectId);
2929
},
3030
},
3131
Mutation: {

src/typeDefs/project.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ type Project {
9696
"""
9797
Project's Event
9898
"""
99-
event(id: ID!): Event @requireAuth
99+
event(id: ID!): Event
100100
101101
"""
102102
Project events
@@ -107,7 +107,7 @@ type Project {
107107
108108
"Certain number of documents to skip"
109109
skip: Int = 0
110-
): [Event!] @requireAuth
110+
): [Event!]
111111
112112
"""
113113
Returns recent events grouped by day
@@ -124,7 +124,7 @@ type Project {
124124
125125
"Event marks by which events should be sorted"
126126
filters: EventsFiltersInput
127-
): RecentEvents @requireAuth
127+
): RecentEvents
128128
"""
129129
Return events that occurred after a certain timestamp
130130
"""
@@ -138,23 +138,23 @@ type Project {
138138
User's local timezone offset in minutes
139139
"""
140140
timezoneOffset: Int! = 0
141-
): [ChartDataItem] @requireAuth
141+
): [ChartDataItem]
142142
"""
143143
Returns number of unread events
144144
"""
145-
unreadCount: Int! @requireAuth
145+
unreadCount: Int!
146146
147147
"""
148148
Project notification settings
149149
"""
150-
notifications: [ProjectNotificationsRule] @requireAuth
150+
notifications: [ProjectNotificationsRule]
151151
}
152152
153153
extend type Query {
154154
"""
155155
Returns project info
156156
"""
157-
project("Project id" id: ID!): Project @requireAuth
157+
project("Project id" projectId: ID!): Project @requireUserInWorkspace
158158
}
159159
160160
extend type Mutation {
@@ -200,7 +200,7 @@ extend type Mutation {
200200
Project image
201201
"""
202202
image: Upload @uploadImage
203-
): Project! @requireAuth
203+
): Project! @requireAdmin
204204
205205
"""
206206
Generates new project integration token by id
@@ -228,6 +228,6 @@ extend type Mutation {
228228
project ID
229229
"""
230230
projectId: ID!
231-
): DateTime! @requireAuth
231+
): DateTime! @requireUserInWorkspace
232232
}
233233
`;

src/typeDefs/workspace.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ export default gql`
119119
""" True if workspace is used for debugging """
120120
isDebug: Boolean
121121
122+
""" True if workspace is blocked """
123+
isBlocked: Boolean
124+
122125
"""
123126
Workspace projects array
124127
"""

0 commit comments

Comments
 (0)