Im a bit new to Silverstripe, so I was just wondering if there are any examples of how to use this library on my Silverstripe 5 headless site via Graphql.
At the moment, my _graphql/models.yml file looks like this:
query pages {
readHomePages(filter: { id: { eq: "1" } }, limit: 1) {
nodes {
id
title
elementalArea {
elements {
nodes {
... on ElementContent {
id
html
title
}
... on BaseElement {
__typename
title
}
}
}
}
}
}
}
and the results look like this:
{
"data": {
"readHomePages": {
"nodes": [
{
"id": "1",
"title": "Homeaa 1",
"elementalArea": {
"elements": {
"nodes": [
{
"__typename": "BaseElement",
"title": "test form" <--- This is the form I have created via the admin panel, need to access to the fields, settings, etc.
},
{
"__typename": "ElementContent",
"id": "1",
"html": "<p>testing! </p>",
"title": "test111"
}
]
}
}
}
]
}
}
}
Hi @palomamtnez
Thank you for your interest and welcome aboard the Silverstripe CMS train.
We don't offer support through github issues. Please ask your question on the forum, slack, or stackoverflow.
Im a bit new to Silverstripe, so I was just wondering if there are any examples of how to use this library on my Silverstripe 5 headless site via Graphql.
At the moment, my
_graphql/models.yml
file looks like this:And my query looks like this:
and the results look like this:
Thanks