Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(journal-crud): Basic Journal CRUD #57

Merged
merged 1 commit into from
Jul 4, 2022

Conversation

d-e-v-esh
Copy link
Collaborator

#54

This PR builds on the journalResolver and adds more functionalities. Now we can do basic CRUD operations with the journal entity. More will be added on top of it in forthcoming PRs.

Changes

  • Updated Journal model and typeDefs
  • Added getJournalByISSN Query
  • Added deleteJournal Mutation
  • Added updateJournal Mutation

Flags

  • Newly added journal fields createdAt, updatedAt and createdBy do not auto-populate yet. This will be added in future PRs.

Copy link
Contributor

@CIPHERTron CIPHERTron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall PR looks good. Just a few nits and then it'll be good to go 🚀

required: false,
},

policies: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @d-e-v-esh we had also planned to have a policyType field right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall I rename policies to polityType?

src/models/Journal.js Show resolved Hide resolved
src/models/Journal.js Show resolved Hide resolved
src/models/Journal.js Show resolved Hide resolved
Copy link
Contributor

@CIPHERTron CIPHERTron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall I rename policies to policyType?

@d-e-v-esh Not really. policyType would be a property of policies

The policies object will have the following properties 👇🏻

policies {
title,
firstYear,
lastYear,
policyType
}

Out of which, only lastYear property can be named as required:false and rest as required: true

Also I noticed that you discarded the lastYear property from policies whereas I intended to say that we can leave as it is, without the required: true property. Please revert this change as well.

Lmk in-case of any queries.

This commit contains the following:
 - Updated Journal model and typeDefs
 - getJournalByISSN Query
 - deleteJournal Mutation
 - updateJournal Mutation
@d-e-v-esh
Copy link
Collaborator Author

d-e-v-esh commented Jul 4, 2022

@CIPHERTron

There are actually more fields that are needed to be added under policies as said by Yo in the last meeting:

policies {
  isDataAvailabilityStatementPublished: Boolean;
  isDataShared: Boolean;
  isDataPeerReviewed: Boolean;
  enforced: Boolean;
  enforcementEvidence: String;
}

After we merge user authentication into the main dev branch, I'll add these fields into the journal schema and go on towards integrating users and journals.

@d-e-v-esh
Copy link
Collaborator Author

I updated it. Let me know if there are any other changes.

Copy link
Contributor

@CIPHERTron CIPHERTron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@CIPHERTron CIPHERTron merged commit a7c414e into codeisscience:dev Jul 4, 2022
@d-e-v-esh d-e-v-esh deleted the journal-crud-foundation branch July 12, 2022 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants