GraphQL/Graphene for backend calls in Django's templates

Viewed 244

I just installed Graphene on my Django project and would like to use it also for the back-end, templating. So far, I find just tutorials how to use it only for front-end, no mention about back-end.

  1. Should I suppose that it is not a good idea to use it instead of a SQL database? If yes, then why? Is there a downside in the speed in the comparison to a SQL databases like MySQL?

  2. What's the best option how to retrieve the data for templates in Python? I mean, best for the performance.

Thnx.

1 Answers
  1. GraphQL is an API specification. It doesn't specify how data is stored, so it is not a replacement for a database.

  2. If you're using GraphQL, you don't use Django templates to specify the GraphQL output, because GraphQL specifies the entire HTTP response from the web service, so this question doesn't make sense.

Related