3 ms·
One piece of advice: if you're implementing a GraphQL server on top of Django, you're better off building your schema with graphene, and avoiding graphene-djang
by yen223 9y ago
One piece of advice: if you're implementing a GraphQL server on top of Django, you're better off building your schema with graphene, and avoiding graphene-django altogether.
graphene-django is pretty buggy, mainly because both Graphene and Django have a lot of implicit behaviour that don't play well together - a common theme among popular Python libraries, sadly. A nasty example (that is now fixed) was that connection fields generated from m2m fields would return every single instance of the target model!
- whalesalad 9y agoFrankly ALL of the GraphQL/Python stuff is a mess. It’s a wonderful contribution to the community but clearly, none of it was designed by a Python hacker. I do agree with your sentiment. Django is less and less valuable to me due to the lock-in. The ecosystem is such that lately you can compose your own system (ie, Flask, Flasql and Graphene, and pick your ORM poison of Peewee or SQLAlchemy) and have a much more modular setup where each part can be replaced more easily.