Skip to content
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

Improve element and property type information #49

Open
Edward-Upton opened this issue Sep 13, 2022 · 0 comments
Open

Improve element and property type information #49

Edward-Upton opened this issue Sep 13, 2022 · 0 comments

Comments

@Edward-Upton
Copy link
Contributor

There's two main ideas for this improvements

Improve Element types

TypeScript doesn't seem to cope well with there being set fields and extra optional ones in elements. This can be fixed by moving to two fields in elements; atts and optAtts. atts contains the required, default attributes like title, coverImg, and iconImg for pages. optAtts would contain the extra information that gets added dynamically usually by the element being in a database (or survey).

We could also think about storing the atts still as an object, but the optAtts in an array (or could still be in an object). Our databases would then need to show the atts as well as the optAtts.

Access Element and Property types in backend

Currently, I am blind in the backend to types. This is not ideal since a lot of the business logic of actions, adding elements etc. will happen here. I could move to a monorepo... but will do some more research into this. Maybe there is a way to set the type of element data in GraphQL dependent on the variable type.

@Edward-Upton Edward-Upton added enhancement New feature or request med-priority labels Sep 13, 2022
@Edward-Upton Edward-Upton added this to To do in Fully Customizable Platform via automation Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request med-priority
Development

No branches or pull requests

1 participant