Created GraphQL and REST endpoints to provide study room data, namely:
allStudyRooms: Returns the id, name, capacity, location, and techEnhanced fields for each study room in the database.
studyRoomById: Returns the id, name, capacity, location, techEnhanced, description, and directions for a specific room, if available.
studyRoomsByFilters: Filters and returns study rooms based on query parameters (location, capacityMin, capacityMax, isTechEnhanced), providing the same fields as allStudyRooms.
Added description and directions fields to the studyRoomById endpoint to provide more details for each specific room.
Related Issue
resolves issue #2
Motivation and Context
These endpoints provide structured access to study room data in both REST and GraphQL formats, fulfilling the requirements outlined in issue #2. These changes allow users to access study room details as a whole, retrieve data for a specific room, or filter rooms based on criteria like location and capacity. This functionality is essential for making study room data available through the API in a scalable and flexible way.
How Has This Been Tested?
Tested locally on a development server using Postman. Verified:
REST Endpoints:
Access to /v2/rest/study-rooms/all returns all rooms.
Access to /v2/rest/study-rooms/{id} returns data for a specific room by ID.
Access to /v2/rest/study-rooms with query parameters returns filtered results.
GraphQL Queries:
Querying allStudyRooms returns a list of all study rooms with the expected fields.
Querying studyRoom(id: "") returns details for a specific room, including description and directions if they are present.
Querying studyRooms(query: { location: "Science Library", capacityMin: 4 }) returns filtered results based on location and capacity.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ ] My code involves a change to the database schema.
[X] My code requires a change to the documentation.
Description
Created GraphQL and REST endpoints to provide study room data, namely:
Added description and directions fields to the studyRoomById endpoint to provide more details for each specific room.
Related Issue
resolves issue #2
Motivation and Context
These endpoints provide structured access to study room data in both REST and GraphQL formats, fulfilling the requirements outlined in issue #2. These changes allow users to access study room details as a whole, retrieve data for a specific room, or filter rooms based on criteria like location and capacity. This functionality is essential for making study room data available through the API in a scalable and flexible way.
How Has This Been Tested?
Tested locally on a development server using Postman. Verified:
REST Endpoints:
Access to /v2/rest/study-rooms/all returns all rooms. Access to /v2/rest/study-rooms/{id} returns data for a specific room by ID. Access to /v2/rest/study-rooms with query parameters returns filtered results.
GraphQL Queries:
Querying allStudyRooms returns a list of all study rooms with the expected fields. Querying studyRoom(id: "") returns details for a specific room, including description and directions if they are present.
Querying studyRooms(query: { location: "Science Library", capacityMin: 4 }) returns filtered results based on location and capacity.
Types of changes
Checklist: