GraphQL Workshop
This is service app to create a basic GraphQL server.
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 :
- apollo-server
- express
- graphql
- SimpleREST.com API
-
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 } }
- 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.
Use the Insomnia requests collection exported on the docs
directory
to test the service running locally.
- With latest Node LTS installed, run the following commands in order:
npm ci
npm run start:db
npm run start:app