Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hawk.api",
"version": "1.1.5",
"version": "1.1.6",
"main": "index.ts",
"license": "UNLICENSED",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/resolvers/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ module.exports = {
/**
* Returns project's Model
* @param {ResolverObj} _obj
* @param {String} id - project id
* @param {String} projectId - project id
* @param {ContextFactories} factories - factories for working with models
* @return {Promise<ProjectDBScheme>}
*/
async project(_obj, { id }, { factories }) {
return factories.projectsFactory.findById(id);
async project(_obj, { projectId }, { factories }) {
return factories.projectsFactory.findById(projectId);
},
},
Mutation: {
Expand Down
18 changes: 9 additions & 9 deletions src/typeDefs/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type Project {
"""
Project's Event
"""
event(id: ID!): Event @requireAuth
event(id: ID!): Event

"""
Project events
Expand All @@ -106,7 +106,7 @@ type Project {

"Certain number of documents to skip"
skip: Int = 0
): [Event!] @requireAuth
): [Event!]

"""
Returns recent events grouped by day
Expand All @@ -123,7 +123,7 @@ type Project {

"Event marks by which events should be sorted"
filters: EventsFiltersInput
): RecentEvents @requireAuth
): RecentEvents
"""
Return events that occurred after a certain timestamp
"""
Expand All @@ -137,23 +137,23 @@ type Project {
User's local timezone offset in minutes
"""
timezoneOffset: Int! = 0
): [ChartDataItem] @requireAuth
): [ChartDataItem]
"""
Returns number of unread events
"""
unreadCount: Int! @requireAuth
unreadCount: Int!

"""
Project notification settings
"""
notifications: [ProjectNotificationsRule] @requireAuth
notifications: [ProjectNotificationsRule]
}

extend type Query {
"""
Returns project info
"""
project("Project id" id: ID!): Project @requireAuth
project("Project id" projectId: ID!): Project @requireUserInWorkspace
}

extend type Mutation {
Expand Down Expand Up @@ -199,7 +199,7 @@ extend type Mutation {
Project image
"""
image: Upload @uploadImage
): Project! @requireAuth
): Project! @requireAdmin

"""
Generates new project integration token by id
Expand Down Expand Up @@ -227,6 +227,6 @@ extend type Mutation {
project ID
"""
projectId: ID!
): DateTime! @requireAuth
): DateTime! @requireUserInWorkspace
}
`;