Allow PageAPI + GraphQL PageAPI take a content query
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
User Story
Right now, our page APIs require a user to pass a url in order to render a page. It would be great if a user could pass a lucene query to pull a page (or pages). If multiple pages are returned, we would return an array of page responses.
OR
If you are pulling back pageAssets/slugs when returning content, we could allow the layout properties to be accessed.
Anyway - it seems like we were right initially calling the page API "Layout as a Service" - headless customers often don't want pages, they want to use a pages layout to be pulled into another page as just a component. Having to query for that by URL can get messy/confusing.
Something like:
page(query: "+path:/about-us/* languageId:1 +site:demo.dotcms.com", limit:10, offset:0, sortBy: "modDate desc") {
_map
urlContentMap {
identifier
modDate
publishDate
creationDate
title
baseType
inode
}
layout {
header
footer
body {
rows {
columns {
Acceptance Criteria
- Allow page responses to be delivered using a query and not just a url
- Allow multiple page responses to come back if multiple pages are requested.
Proposed Objective
Please Select
Proposed Priority
Please Select
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the PageAPI and GraphQL PageAPI entry points and how they currently accept a URL. Define how a Lucene content query, limit, offset, and sort should produce one or multiple page responses, then verify the implementation against the two acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, java
- Domain
- api, backend-api-design, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100