Back End for my charity app
This app will give volunteers the ability to search local charities and events. Volunteers will be able to favorite charities and view attended request. Charities will be able to manage volunteers data and event data.
Use the package manager npm to install charity-be.
npm install
To start the Apollo server type:
npm start
To run lint in terminal run .
npm run lint
To run lint and auto fix in terminal run
npm run lint:fix
Here you can find info on Github Apollo Server 2.x
Here are the docs on Apollo server
Here are examples to do graphql queries and mutations.
query {
events {
eventContact
address
charity
eventDetails
}
}
mutation {
createEvent(
input:{
dateOfEvent: "Friday, September 18, 2020 7:00:00 PM"
eventContact: "Angela Smirnoff"
address: "1st ave New York, New York"
eventEmail: "angela@email.io"
eventDetails: "This is an event created with graphql"
charity: "5e08fe0c1623cb085602857b"
}){
eventDetails
}
}
mutation {
updateEvent(
id: "5e250f1ba3f427985ff85c84"
input: {
dateOfEvent: "Thursday, September 17, 2020 7:00:00 PM"
eventContact: "Angela Smirnoff"
address: "1st ave New York, New York"
eventEmail: "angela@email.io"
eventDetails: "This is an event created with graphql"
charity: "5e08fe0c1623cb085602857b"
}
) {
eventDetails
}
}
mutation {
deleteEvent(id: "5e0ac8862ceb952d50309483") {
eventDetails
eventContact
}
}
Branches should be based off master and name convention is -issue- for example John Doe's branch for issue number 20 would be
jd-issue-20
Unit test are in Jest . Mongoose test use jest-mongodb which is mongo in memory. Download location to run test in terminal run
npm run test
To run test in watch mode type
npm run test:watch
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Pull request: For pull request to merge all unit test need to pass and eslint pass, Github Actions run these on a push. You will need at least 1 reviewer on a PR to sign off for it to merge. If you have more than several commits please squash them before merging in case they need to be reverted. In the comments of your pr please include
closing issues keywords
Get more help here Closing issues keywords