3 ms·
Just curious if someone could give the tldr version of this vs graphql. I'm familiar with django, but not the rest framework, and have a basic understanding of
by bsbechtel 10y ago
Just curious if someone could give the tldr version of this vs graphql. I'm familiar with django, but not the rest framework, and have a basic understanding of graphql but am not really sure how they compare.
- morenoh149 10y agoThis has very little to do with graphql. The DRF is to get a solid json api up and running quickly. The standard it ships with conforms to the http://jsonapi.org/ http://jsonapi.org/ spec. Which came mostly from the Rails community and many projects built in different stacks conform to. If you're familiar with Rails it's like https://github.com/rails-api/rails-api https://github.com/rails-api/rails-api which was recently merged into Rails in v5. You could totally add a graphql endpoint to any api `/graphql?[your GQL query here]`. We're currently exploring adding that to our Django/DRF backend with one of these https://github.com/chentsulin/awesome-graphql#lib-py https://github.com/chentsulin/awesome-graphql#lib-py
- cdrx 10y agoStandard DRF is nothing like the JSON API spec.
- morenoh149 10y agoThis is true. My mistake. At our company we added https://github.com/django-json-api/django-rest-framework-json-api https://github.com/django-json-api/django-rest-framework-jso... to get DRF conformant to jsonapi spec.