server for assignment GraphQL

Background information

###run

  • edit /config/default.json
  • provide mongodb connection path [mongodb://localhost:27017/assignment by default]
  • npm install
  • npm start

###current endpoints

  • /users
  • /apartments
  • /locations
  • /graphql
  • /graphiql

##What to do - for backend engineers

  1. add new endpoint /countries which should represent the data from the countries collection
  2. add countries to /graphql endpoint
  3. add country to locations.graphql.schema as a representative of country information
  4. add functionality to use limit and skip as a parameters to fetch data through /graphql endpoint
  5. If you run the following query, location will always be null. Please figure out why this is happening. After you found out how this happens, please describe the reason and how you found the issue.
      apartments(owner: $owner) {  
        items {  
          location {  
            title  
          }  
        }  
      }  
    }