TYPO3-Headless / headless

TYPO3 Headless JSON API providing content for PWA application (e.g. javaScript apps like nuxt-typo3)
https://t3headless.io
GNU General Public License v2.0
156 stars 57 forks source link

[Suggest] Use JSON:API standard #17

Open aimeos opened 5 years ago

aimeos commented 5 years ago

Instead of inventing an own JSON structure, please think about using the JSON:API standard that is widely supported by JS frameworks: https://jsonapi.org/

We have made good experience using the standard for our own JSON REST API for e-commerce: https://github.com/aimeos/ai-admin-jqadm

A REST API also fits better than GraphQL for a CMS because a CMS frontend has to read a lot of data but don't need to write large data sets. We've published an article about the pros and cons of JSON:API and GraphQL: https://aimeos.org/tips/graphql-vs-jsonapi-for-ecommerce/

Dries from Drupal also made a good article why Drupal prefers JSON:API over GraphQL: https://dri.es/headless-cms-rest-vs-jsonapi-vs-graphql

Moongazer commented 4 years ago

I strongly upvote this suggestion, because the last days of evaluating this headless implementation to use it in a proper application gave me much headaches.

As TYPO3 uses a lot of Symfony packages already, I'd recommend to look into the symfony-jsonapi implementation for example.

lukaszuznanski commented 4 years ago

We don't have json JSON:API implementation currently on our roadmap, but we're open for contributions (first concept, later implementation) in this area. If the concept turned out feasible, we could reconsider the roadmap. What is important is that we want TYPO3 to still be responsible for url generation and routing (and not JS app), this way editor can work on application and has full control.

dogawaf commented 2 years ago

Hello

A standard like JSON:API could be a nice improvement. Many frontend frameworks have datastore that implements those standard.