Restrict the names used to create new Content-types
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
There can be conflicts with our GraphQL API when using certain reserved names, for example:
"Pagination",
"QueryMetadata"
We should also restrict the use of the prefix Dot when creating a new ContentType
and perhaps even validate against any other existing or registered GraphQL type to avoid these kinds of conflicts in the future
Steps to Reproduce
To test, we should use the Contenttype portlet and create content types using restricted/reserved words
Acceptance Criteria
- The validation should be added at the API level
- We should test that any new content type can not override any of the existing GraphQL registered types
- We should always be capable of loading the schema and using the Query tool
- Upon an error creating the CT we should display the proper dialog showing the error
- The error returned by the API should be HTTP 400 (Bad Request), including the offending naming
dotCMS Version
current main
Proposed Objective
Customer Success
Proposed Priority
Priority 3 - Average
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 with the Contenttype portlet creation flow and its API, then inspect how registered GraphQL types are loaded and exposed through the schema and Query tool. Done means reserved and conflicting names are rejected with an HTTP 400 response naming the offending value, while valid content types still load the schema and the error dialog displays the API message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, java
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100