Skip to content

Rework QueryParameters #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wisepotato opened this issue Oct 9, 2019 · 2 comments
Closed

Rework QueryParameters #562

wisepotato opened this issue Oct 9, 2019 · 2 comments

Comments

@wisepotato
Copy link
Contributor

from #558

@maurei maurei changed the title Wire the parsing of URL query parameters back into QueryParser Rework QueryParameters Oct 10, 2019
@maurei
Copy link
Member

maurei commented Oct 10, 2019

URL query param services
Each URL query operator has been moved to its own dedicated service. This is to prevent that if a service needs only a small subset (eg IncludedRelationshipBuilder needs only the inclusion chains), it does not exposed to all the other query parameters too.

IPageQueryService the former page manager
IFieldQueryService to access sparse field selections
IIncludedQueryService to access inclusion chains
IAttributeBehaviourQueryService to encapsulate the feature described here
Others are yet to be implemented: FilterQueryService, SortQueryService. I might be missing more.
Each service will also contain "business logic" related to that particular service. For example IIncludedQueryService

knows how to convert a chain ("articles.author.favorite-food") into corresponding RelationshipAttributes
throws errors when a non-existing relationship is targeted

@maurei
Copy link
Member

maurei commented Oct 10, 2019

  • Redo query parsing: migrate logic to dedicated service.
  • create dedicated service for Sort query parameter
  • create dedicated service for Filter query parameter
  • document how custom query parameters can be created using IQueryParameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants