Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rproenza86/simplerestapi-graphql-client
GraphQL server project built using Apollo Server and ExpressJS.
https://github.com/rproenza86/simplerestapi-graphql-client
apollo-server expressjs graphql integration-testing jest unit-testing
Last synced: about 6 hours ago
JSON representation
GraphQL server project built using Apollo Server and ExpressJS.
- Host: GitHub
- URL: https://github.com/rproenza86/simplerestapi-graphql-client
- Owner: rproenza86
- Created: 2021-05-03T12:45:33.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-25T17:14:07.000Z (almost 2 years ago)
- Last Synced: 2024-05-29T19:10:36.486Z (5 months ago)
- Topics: apollo-server, expressjs, graphql, integration-testing, jest, unit-testing
- Language: JavaScript
- Homepage:
- Size: 303 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simplerestapi-graphql-client
> GraphQL Workshop
This is service app to create a basic GraphQL server.
## Description
GraphQL server project built using Apollo Server and ExpressJS.
The service is using directives to enable security by checking user auth. Two data sources were created to support CRUDs ops.
The app is an orchestration of :
1. apollo-server
2. express
3. graphql
4. SimpleREST.com API## API Requirements
1. Consumers of the service should be able of use the serve endpoint to:
- Execute mutation to increment a property favorite counter by 1.
- Fetching properties data from the SimplyRETS API and for each result, inject the “favorite counter” from MongoDB.
- We should be able to filter properties by city.Example:
query {
properties(city: "San Francisco") {
listingId
favoriteCount // coming from MongoDB, everything else comes from SimplyRETS
listPrice
property {
area
bedrooms
}
address
disclaimer
}
}2. Unit tests and/or integration tests support
> Added one test suite of each type. Added also un-implemented test cases to show other scenarios that need to be tested.## How to Test
Use the [Insomnia requests collection](docs/serviceRequestsCollection/Insomnia_SimpleREST.json) exported on the `docs` directory
to test the service running locally.### Tests setup
1. With latest Node LTS installed, run the following commands in order:
```sh
npm ci
npm run start:db
npm run start:app
```