-
And that's why I love so much NestJS and its code first approach.
https://docs.nestjs.com/graphql/quick-start#code-first
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
-
DjangoChannelsGraphqlWs
Django Channels based WebSocket GraphQL server with Graphene-like subscriptions
-
- Django 3 backed with a Postgres database (standard stuff) [0]
- Add Graphene to enable Relay [1]
- Setup a fresh TypeScript based NextJS project [2]
- Add graphql-code-generator with a few plugins, mainly the graphql-request one [3]
- THE MAGIC: Generate your sdk by pointing graphql-codegen at your Django GraphQL schema!
- Add react-query, use the newly generated graphql-request client [4]
From here you've enabled the best of frontend technologies (NextJS, react-query) with a fully typed SDK generated by your familiar Python/Django bindings.
You can then move forward to add GraphQL based WebSockets via django-channels [5] + django-channels-graphql-ws [6] that update your existing react-query caches. Combine this with background Celery workers that make push to django-channels via Redis and you've got a a UI that auto updates based on background tasks as well.
[0] https://www.djangoproject.com
-
react-query
Discontinued 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]
[4] https://react-query.tanstack.com
-
-
Similar benefits without codegen (based on decorator magic) for a python based stack:
https://github.com/adsharma/fquery
* Use dataclasses for both database schema and the user facing operations
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
Same. I paired that with https://typegraphql.com/ (which builds the graphql schema dynamically from the code using buildSchemaSync) and MikroORM (which you can overlap your entities with to remove duplication there) and it was a totally generated solution with full type safety.
A bit crazy complex to setup so many moving pieces, but once it is, it works great.
-
By now you get a lot of typesafety without the need to write any types manually or having to generate them on the on the server by using https://github.com/sikanhe/gqtx
-
I had some issues with typegraphql years ago. I tried to split resolvers between modules and it behaved weirdly during unit tests. We also already used graphql-compose at job, so I wrote my own typescript decorator based solution on top of graphql-compose (https://github.com/captain-refactor/graphql-compose-typescri...)
-
I had some issues with typegraphql years ago. I tried to split resolvers between modules and it behaved weirdly during unit tests. We also already used graphql-compose at job, so I wrote my own typescript decorator based solution on top of graphql-compose (https://github.com/captain-refactor/graphql-compose-typescri...)