Solving the double (quintuple) declaration Problem in GraphQL Applications

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • graphql

    GraphQL (TypeScript) module for Nest framework (node.js) 🍷 (by nestjs)

  • And that's why I love so much NestJS and its code first approach.

    https://docs.nestjs.com/graphql/quick-start#code-first

  • django-channels

    Developer-friendly asynchrony for Django

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • DjangoChannelsGraphqlWs

    Django Channels based WebSocket GraphQL server with Graphene-like subscriptions

  • Django

    The Web framework for perfectionists with deadlines.

  • - 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

  • Next.js

    The React Framework

  • fquery

    A graph query engine (by adsharma)

  • 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

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • TypeGraphQL

    Create GraphQL schema and resolvers with TypeScript, using classes and decorators!

  • 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.

  • gqtx

    Code-first Typescript GraphQL Server without codegen or metaprogramming

  • 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

  • graphql-compose-typescript

  • 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...)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts