itsjustjordan
π Joined in 2021
πΌ 43 Karma
βοΈ 14 posts
Load more
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
We have an inbox list that is a combination of three different entities (direct message, job request, support message), we display all of these in a unified inbox, rather than pulling all the data with REST and sorting through what fields to use to display as a title and what status maps to which styling/label etc. I can just use my InboxPageQuery and render exactly what it tells me to, being able to build or change entire pages just by pushing new server code really helps with speeding up our dev time.
{
"data": {
"inbox": {
...
"inboxItems": [
{
...
"subtitle1": {
"__typename": "InboxStandardText",
"accessibilityText": "Hi Jordan.\n\nSarah has posted a handyman job near you",
"components": [
{
"__typename": "InboxStandardTextComponent",
"text": "Hi Jordan.\n\nSarah has posted a handyman job near you...",
"type": null
}
]
},
"subtitle2": {
"__typename": "InboxStandardText",
"accessibilityText": "You declined this job today",
"components": [
{
"__typename": "InboxStandardTextComponent",
"text": "Declined",
"type": "errored_text"
},
{
"__typename": "InboxStandardTextComponent",
"text": " Β· ",
"type": "errored_text"
},
{
"__typename": "InboxStandardTextComponent",
"text": "07/06/23",
"type": "errored_text"
}
]
},
...
}
],
...
}
}
}(Replying to PARENT post)
For me I saw the most benefit when I used the schema to define what to display in the frontend, all the logic of what to display is done on the server and my frontend just becomes simple components that render the pulled schema.
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
https://www.independent.co.uk/news/uk/politics/theresa-may-w...