feat(server): add customAttributes to Entity #6063
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
part of: #5989
PR Details
The first PR for the epic - add the server-side functionality for Entity.CustomAttrbute
🤖 Generated by Copilot at 2e23e5f
Summary
🏷️🛠️🧪
This pull request adds support for custom attributes on entities and entity versions in the app builder. It modifies the Prisma schema, the database migrations, the GraphQL schema, the TypeScript models, the service and resolver files, and the input and output classes to include a
customAttributes
field as a string. It also updates the test files to cover the new functionality.Walkthrough
customAttributes
columns toEntity
andEntityVersion
tables in the database to store custom attributes as text (link)customAttributes
fields toEntity
andEntityVersion
models in the Prisma schema to map the columns and generate TypeScript types and queries (link, link)customAttributes
field toEntity
class in the TypeScript code and the GraphQL schema to represent the entity model and allow users to query and mutate the custom attributes as a string (link, link)customAttributes
field toEntityVersion
class in the TypeScript code and the GraphQL schema to represent the entity version model and allow users to query and mutate the custom attributes as a string (link, link)customAttributes
field to various input types in the GraphQL schema to enable filtering, sorting, creating, and updating entities and entity versions by their custom attributes (link, link, link, link, link, link)customAttributes
field to various input classes and interfaces in the TypeScript code to match the GraphQL schema and pass the user input to the Prisma methods (link, link, link, link, link, link, link, link, link)customAttributes
field to various output arrays and interfaces in the TypeScript code to request and return the custom attributes from the Prisma methods (link, link, link, link)customAttributes
field to various queries and mutations in the resolver test files to provide, request, and assert the custom attributes in the test cases (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)PR Checklist
npm test
doesn't throw any errorIMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing guidelines.