Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kotahi
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Omo Oaiya
Kotahi
Commits
918a03f5
Commit
918a03f5
authored
4 years ago
by
Jure
Browse files
Options
Downloads
Patches
Plain Diff
feat: use manuscriptId relation for teams instead of object polymorphism
parent
a4416235
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/model-team/src/graphql.js
+5
-13
5 additions, 13 deletions
server/model-team/src/graphql.js
with
5 additions
and
13 deletions
server/model-team/src/graphql.js
+
5
−
13
View file @
918a03f5
...
...
@@ -62,9 +62,8 @@ const resolvers = {
const
t
=
await
ctx
.
models
.
Team
.
query
().
findById
(
team
.
id
)
return
t
.
$relatedQuery
(
'
members
'
)
},
object
(
team
,
vars
,
ctx
)
{
const
{
objectId
,
objectType
}
=
team
return
objectId
&&
objectType
?
{
objectId
,
objectType
}
:
null
manuscript
(
parent
,
vars
,
ctx
)
{
return
ctx
.
models
.
Manuscript
.
query
().
findById
(
parent
.
manuscriptId
)
},
},
TeamMember
:
{
...
...
@@ -100,7 +99,7 @@ const typeDefs = `
type: String!
role: String!
name: String
object: TeamObjec
t
manuscript: Manuscrip
t
members: [TeamMember!]
owners: [User]
global: Boolean
...
...
@@ -136,16 +135,10 @@ const typeDefs = `
aff: String
}
type TeamObject {
objectId: ID!
objectType: String!
}
input TeamInput {
role: String
name: String
objectId: ID
objectType: String
manuscriptId: ID
members: [TeamMemberInput]
global: Boolean
}
...
...
@@ -153,8 +146,7 @@ const typeDefs = `
input TeamWhereInput {
role: String
name: String
objectId: ID
objectType: String
manuscriptId: ID
members: [TeamMemberInput]
global: Boolean
users: [ID!]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment