diff --git a/app/Root.jsx b/app/Root.jsx index 339ec005f06e24d58dbfd3ca3153d3061c96ccf1..1cbe6be3956f846caf08ae38b112bf84dbcac11d 100644 --- a/app/Root.jsx +++ b/app/Root.jsx @@ -78,6 +78,9 @@ const makeApolloClient = (makeConfig, connectToWebSocket) => { link, cache: new InMemoryCache({ typePolicies: { + ManuscriptMeta: { + keyFields: ['manuscriptId'], + }, Manuscript: { fields: { _currentRoles: { diff --git a/app/components/component-dashboard/src/graphql/mutations/index.js b/app/components/component-dashboard/src/graphql/mutations/index.js index 98298141648012e81b84eccd96a70460048a2ce0..019eceb78ba1b28f61adcd3fa8ef7334c72aabd3 100644 --- a/app/components/component-dashboard/src/graphql/mutations/index.js +++ b/app/components/component-dashboard/src/graphql/mutations/index.js @@ -74,6 +74,7 @@ export default { } } meta { + manuscriptId title declarations { openData diff --git a/app/components/component-dashboard/src/graphql/queries/index.js b/app/components/component-dashboard/src/graphql/queries/index.js index 1b45a6149ad022cf6d15961d793e6e9f506e7d68..14952c20c8e356ccac9810bb8931904ce3a9aa3d 100644 --- a/app/components/component-dashboard/src/graphql/queries/index.js +++ b/app/components/component-dashboard/src/graphql/queries/index.js @@ -43,6 +43,7 @@ export default { } status meta { + manuscriptId title declarations { openData diff --git a/app/components/component-manuscripts/src/Manuscripts.jsx b/app/components/component-manuscripts/src/Manuscripts.jsx index 5d62f1d99c9d9ddff69766c5a337460b7d6bb9d2..b07e1bd23d35fc6712e0b79d7c5ae1f0de8b5e19 100644 --- a/app/components/component-manuscripts/src/Manuscripts.jsx +++ b/app/components/component-manuscripts/src/Manuscripts.jsx @@ -33,6 +33,7 @@ const GET_MANUSCRIPTS = gql` manuscripts { id meta { + manuscriptId title } created @@ -97,6 +98,7 @@ const Manuscripts = () => { offset: (page - 1) * limit, limit, }, + fetchPolicy: 'network-only', }) if (loading) return <Spinner /> diff --git a/app/components/component-submit/src/components/SubmitPage.js b/app/components/component-submit/src/components/SubmitPage.js index 5c6ce3ed5bfc80c4b458a073b6829b00b553a2a3..c510504b92d171e1d410ae6b3df910f63d339f59 100644 --- a/app/components/component-submit/src/components/SubmitPage.js +++ b/app/components/component-submit/src/components/SubmitPage.js @@ -47,6 +47,7 @@ const fragmentFields = ` decision status meta { + manuscriptId title abstract declarations { diff --git a/app/components/component-submit/src/upload.js b/app/components/component-submit/src/upload.js index 2f06bf098e004f8de51fd787423bd4a6da631185..3a733062e9901182411a6d9212f342a7b835814f 100644 --- a/app/components/component-submit/src/upload.js +++ b/app/components/component-submit/src/upload.js @@ -59,6 +59,7 @@ const createManuscriptMutation = gql` } } meta { + manuscriptId title declarations { openData diff --git a/app/components/component-teams-manager/src/components/graphql/queries/index.js b/app/components/component-teams-manager/src/components/graphql/queries/index.js index b522b5e93705ad3042aff17436c15326ed0aa48c..5f31211a9a822ee407c42ee44f00561366bf183b 100644 --- a/app/components/component-teams-manager/src/components/graphql/queries/index.js +++ b/app/components/component-teams-manager/src/components/graphql/queries/index.js @@ -4,6 +4,7 @@ const fragmentFields = ` id created meta { + manuscriptId title } ` diff --git a/server/model-manuscript/src/graphql.js b/server/model-manuscript/src/graphql.js index 39b107a3d1b25c921df8fc50cd74310138b0d9b1..cc598e633a7b61e98189582678707f64524add96 100644 --- a/server/model-manuscript/src/graphql.js +++ b/server/model-manuscript/src/graphql.js @@ -308,6 +308,9 @@ const resolvers = { await ctx.models.Manuscript.query().findById(parent.id) ).$relatedQuery('teams') }, + meta(parent) { + return { ...parent.meta, manuscriptId: parent.id } + }, }, ManuscriptVersion: { submission(parent) { @@ -434,6 +437,7 @@ const typeDefs = ` publicationDates: [MetaDate] notes: [Note] keywords: String + manuscriptId: ID } type ArticleId {