gqtx VS examples-next-prisma-starter

Compare gqtx vs examples-next-prisma-starter and see what are their differences.

gqtx

Code-first Typescript GraphQL Server without codegen or metaprogramming (by sikanhe)
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
gqtx examples-next-prisma-starter
6 5
450 662
- 3.0%
0.0 8.4
4 months ago 4 days ago
TypeScript TypeScript
- -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

gqtx

Posts with mentions or reviews of gqtx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-06-24.
  • Replacing Nexus
    3 projects | /r/graphql | 24 Jun 2022
    My favorites are Pothos and gqtx. In terms of documentation and adoption Pothos definitely wins over gqtx. You might also want to check out the "I'm struggling to find proper Graphql Stack" Reddit thread.
  • Solving the double (quintuple) declaration Problem in GraphQL Applications
    11 projects | news.ycombinator.com | 14 Aug 2021
    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
  • What do you think about nexus? I'm new at this and wondering if I should use it in my project.
    3 projects | /r/graphql | 19 May 2021
    There are multiple ways available of constructing a graphql schema. Usually, you can break down those into "SDL" First and "Code" First. A simple example of a Code First approach is the programmatic graphql.js API using `new GraphQLObjectType`. You define your schema with code. In an SDL First approach, you write your schema in the GraphQL SDL (as text) and define a resolver map. You can find some examples over here: https://graphql.org/graphql-js/constructing-types/ A lot of tooling has emerged of those two methods of building GraphQL schemas and you usually have to choose whether you wanna stick to Code First or SDL First. Tools like gqtx (https://github.com/sikanhe/gqtx), giraphql (https://github.com/hayes/giraphql), and nexus (https://github.com/graphql-nexus/nexus) are built around the Code First approach and improve the developer experience over the programmatic API form graphql.js by providing a more type-safe API when utilizing TypeScript. They ultimately all do the same, with slightly (more or less opinionated) different APIs. On the other hand tooling for SDL has also evolved. graphql-tools provides a more advanced interface over how you define the resolvers map and a lot of utilities for constructing your schema from SDL/resolver map partials distributed across different files (https://www.graphql-tools.com/docs/generate-schema/). Together, with graphql-codegen resolver type generation (https://www.graphql-code-generator.com/docs/plugins/typescript-resolvers) you can bring this to the next level if you are working with TypeScript and generate fully typed resolvers from the GraphQL SDL. You have to find out for yourself which approach is best suited for you. I have been using both on different projects and they both have benefits and trade-offs. My opinion is mostly based on the TypeScript developer experience. Code First seems to be the better pick for me if you have lots of computed fields that cannot be mapped 1:1 to the data sources, where you would have to add a lot of type resolver mappings configuration for codegen. With SDL I like that I have the feeling that I can write the schema faster and less clumsy, and the SDL is immediately readable. On Code First you, however, can still generate an SDL file from the coding schema. Maybe there is a niche open for an approach that combines Code and SDL First approaches. We will have to see what the future brings. Here are some more articles/threads regarding the topic: https://www.prisma.io/blog/the-problems-of-schema-first-graphql-development-x1mn4cb0tyl3 https://www.reddit.com/r/graphql/comments/fpkx7a/codefirst\_vs\_schemafirst\_development/ https://blog.logrocket.com/code-first-vs-schema-first-development-graphql/ Also, note that most GraphQL server/transports do or should not care about the way you construct your schema. E.g. the apollo-server docs show you only an SDL first way of constructing the schema (https://www.apollographql.com/docs/apollo-server/schema/schema/), but it is also possible to provide a schema instance(https://www.apollographql.com/docs/apollo-server/api/apollo-server/#schema). apollo-server defaults to advocating creating a schema with SDL (by using an old graphql-tools@4 version under the hood).
    3 projects | /r/webdev | 18 May 2021
    Tools like gqtx (https://github.com/sikanhe/gqtx), giraphql (https://github.com/hayes/giraphql), and nexus (https://github.com/graphql-nexus/nexus) are built around the Code First approach and improve the developer experience over the programmatic API form graphql.js by providing a more type-safe API when utilizing TypeScript. They ultimately all do the same, with slightly (more or less opinionated) different APIs.
  • Need guidance on apollo subscription fallback
    4 projects | /r/graphql | 16 May 2021
    If I can give you an additional tip: Think twice whether you actually need apollo-server. All you need is a way of constructing a schema, which you can either do with the graphql.js programmatic API, graphql-tools (https://www.graphql-tools.com/docs/generate-schema/), or type-safe code first schema builders such as https://giraphql.com/ or https://github.com/sikanhe/gqtx
  • What are your thoughts on Next/Apollo/Prisma stack? Should I use it for my project (see details in the description)? Can you share some advice?
    6 projects | /r/webdev | 14 May 2021
    You will also have to figure out which schema generation flow suits you best. E.g. you can use the programatic API from graphql-js, makeExecutableSchema from graphql-tools https://www.graphql-tools.com/docs/generate-schema/ or code schema builders like https://github.com/sikanhe/gqtx or https://github.com/hayes/giraphql

examples-next-prisma-starter

Posts with mentions or reviews of examples-next-prisma-starter. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-14.
  • Potrebna mi je smernica/pomoc oko Next.js 13
    1 project | /r/programiranje | 9 May 2023
  • Full-Stack TypeScript with tRPC and React
    7 projects | news.ycombinator.com | 14 Mar 2023
    Here's an example of testing: https://github.com/trpc/examples-next-prisma-starter/blob/ma...
  • T3 Stack: Prisma, tRPC error
    1 project | /r/nextjs | 16 Nov 2022
    { e.preventDefault(); const $form = e.currentTarget; const values = Object.fromEntries(new FormData($form)); type Input = inferProcedureInput< AppRouter["dailyActivity"]["addDailyActivity"] >; // ^? const input: Input = { name: values.title as string, timeSpent: values.text as string, }; try { await addActivity.mutateAsync(input); $form.reset(); } catch (cause) { console.error({ cause }, "Failed to add post"); } }} > Title: Text:
    {addActivity.error && (

    {addActivity.error.message}

    )}

    )

    So I am copying/learning the logic from https://github.com/trpc/examples-next-prisma-starter. In this code, there is no ID provided in the query, yet in my code, I get the error that I need to provide an ID. Since the ID in the prisma schema is cuid() doesn't that mean that is autogenerated? What am I missing?

  • Type-safe env variables
    3 projects | dev.to | 30 Sep 2022
    In this quick blog post, I will use one of TRPC's examples available on GitHub to explain this concept in real life and then show you how to handle default values in development mode.
  • Replacing Nexus
    3 projects | /r/graphql | 24 Jun 2022
    A bit of heresy to post this in the GraphQL subreddit but another alternative is tRPC + Prisma. I was testing both Pothos and tRPC yesterday and the latter is just so simple while still giving you full end-to-end type safety.

What are some alternatives?

When comparing gqtx and examples-next-prisma-starter you can also consider the following projects:

pothos - Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach

trpc-nextjs - next.js + tRPC example

mercurius-typescript - TypeScript usage examples and "mercurius-codegen" for Mercurius

create-t3-app - The best way to start a full-stack, typesafe Next.js app

nexus - Code-First, Type-Safe, GraphQL Schema Construction

zodios - typescript http client and server with zod validation

graphql-upload - Middleware and an Upload scalar to add support for GraphQL multipart requests (file uploads via queries and mutations) to various Node.js GraphQL servers.

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

Incredible - Incredible drastically simplifies creation of developer video content. It offers a unified workflow to storyboard, record, collaborate and produce the video.

graphql-compose-typescript

garph - Fullstack GraphQL Framework for TypeScript