Why: Now, when you have some website, you must hardcore content + blocks. But what if (for example) is homepage like this:
logo
carousel
paragraph title 1
text 1
image
paragraph title 2
text 2
Now, we must create “homepage” as single content and hardcode these elements. But what is somebody wants to add third paragraph, or put carousel bellow first paragraph? If there will be support for dynamic blocks, it will be possible.
Our proposal is to use current features. We propose to use “array” of undefined “relations”. For example I create scheme called page and hardcode only “title”/“id”,“meta” and put there entity “array” and allow to put there “reference” entity without scheme. Now this is possible and if you switch to content, it will looks like this:
I am not sure if it makes sense, If the content is consumed by another consumer, such as an app or mobile view the arrangement might be totally different.
Yes, I understand, but Squidex is very powerful using GraphQL. And if Squidex is holder of page content & structure, you can download whole “page” scheme via graphQL, map it to react app components and dont care about page structure. You will become a real “content” builder, instead of only “hardcoded input filler”.
Sorry, but I am not sure, if we are talking about the same functionality. Dynamic blocks allows you to dynamically create page content + page structure/layout. You are talking about usecases/BRQs about working with entitites.
Maybe imagine this usecase: You want to create website. There are similar pages except homepage and contact page. Each page has metadata (a lot of :)) and two paragraphs and two headings. Now I must create these entities:
homepage (single content)
contanct page (single content)
page (multiple content)
In these entities i have duplicit schema. In react application, programator must prepare three page types and ask three different ways for content using GraphQL.
So, this is reason, where dynamic blocks can help, because entity will be only one - PAGE (multiple content). And I create homepage and plug there dynamic block, contact page with another dynamic blok and other pages will contain the same content. React developer dont care about page type, because he map GraphQL content to widgets.
If you have selected a single schema, nothing changes. If you have selected multiple schemas or no schemas a union type with an interface is created, e.g.:
query {
findMySchemaContent(id: '12345') {
id
data {
myUnion {
iv {
... on Content { // The interface.
id
}
... on MyRefSchema1 {
data {
ref1Field {
iv
}
}
}
__typename
}
}
}
}
}