Package it.univr.passportease.controller
Class UserWorkerQueryController
java.lang.Object
it.univr.passportease.controller.UserWorkerQueryController
Controller for user and worker queries. It handles the following GraphQL queries:
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate BucketLimiter
Bucket limiter for rate limiting.private final UserWorkerQueryService
Service for user and worker queries. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAvailabilities
(AvailabilityFilters availabilityFilters, Integer size, Integer page) This query returns the availabilities matching the given filters.This query returns all the offices in the database.
-
Field Details
-
userWorkerQueryService
Service for user and worker queries. -
bucketLimiter
Bucket limiter for rate limiting.
-
-
Constructor Details
-
UserWorkerQueryController
public UserWorkerQueryController()
-
-
Method Details
-
getAvailabilities
@QueryMapping public List<Availability> getAvailabilities(@Argument("availabilityFilters") AvailabilityFilters availabilityFilters, @Argument("size") Integer size, @Argument("page") Integer page) throws RateLimitException This query returns the availabilities matching the given filters. It returns a paginated list of availabilities if the page and size arguments are provided.- Parameters:
availabilityFilters
- filters to apply to the query, if anysize
- number of results to return per page, optionalpage
- page number starting from 0, optional- Returns:
- list of
Availability
matching the filters, paginated if requested - Throws:
RateLimitException
- if the user or worker has exceeded the rate limit
-
getOffices
This query returns all the offices in the database.- Returns:
- list of
Office
- Throws:
RateLimitException
- if the user or worker has exceeded the rate limit
-