Skip to content
Snippets Groups Projects
Commit f334c3f4 authored by Jure's avatar Jure
Browse files

feat: add proper files resolver to manuscript/manuscriptVersion

parent 26461ab4
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,14 @@ const ManuscriptResolvers = ({ isVersion }) => {
await ctx.models.Manuscript.query().findById(parent.id)
).$relatedQuery('teams')
},
async files(parent, _, ctx) {
return parent.files
? parent.files
: (
await ctx.models.Manuscript.query().findById(parent.id)
).$relatedQuery('files')
},
meta(parent) {
return { ...parent.meta, manuscriptId: parent.id }
},
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment