Instead of posting the discussion in different subreddits you can also just link it. This is kind of the exact duplicate of what I answered here https://www.reddit.com/r/webdev/comments/nfxe4v/what_do_you_think_about_nexus_im_new_at_this_and/gyo2k9w/ 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). Answer from n1ru4l on reddit.com
🌐
Reddit
reddit.com › r/graphql › what do you think about nexus? i'm new at this and wondering if i should use it in my project.
r/graphql on Reddit: What do you think about nexus? I'm new at this and wondering if I should use it in my project.
May 19, 2021 -

Hi! I'm building a project with next.js/prisma/apollo/graphql/typescript stack. I'm relatively new at this stuff, but I'm determined to learn all these technologies.

I keep seeing examples of people using nexus along with this stack, but I don't entirely understand the value it adds. On one hand, I don't need yet another unfamiliar tech to deal with, on another, if it makes things better/easier somehow, I'd do it.

Could someone ELI5 this for me? Should I be learning it and using it in my project?

Top answer
1 of 3
5
Instead of posting the discussion in different subreddits you can also just link it. This is kind of the exact duplicate of what I answered here https://www.reddit.com/r/webdev/comments/nfxe4v/what_do_you_think_about_nexus_im_new_at_this_and/gyo2k9w/ 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).
2 of 3
1
So I am working on a project with the exact same stack and I tried nexus about 3 weeks ago, all I can say is, it's versioning conflicts is a mess right now. I went back and forth between Nexus and TypeGraphQl and chose Nexus However, one thing I found with Nexus that I did not enjoy was how poorly the different packages for Nexus and Prisma worked together. The functionality was all good but there is a lot of conflict with their versioning and dropping old versions before new solutions are production-ready. The whole conflict between these packages has really thrown me off Nexus so far. I ended up switching from Nexus to Type-GraphQL and I can say Type-GraphQL has been a much better experience from the start. The model mapping for Prisma worked perfectly without any issue or confusion the first time around. I have also found make custom queries, mutations, and resolvers to be very straightforward. I may come back and try Nexus some other time when their development stuff is all sorted but at this stage, I feel comfortable recommending Type-GraphQL over Nexus from my experience. There are a few pain points with Type-GraphQL compared to Nexus but they are minor. I still prefer function-based programming over class but it's not a big deal for defining a Graph API. I also find with all the decorators, it can add a fair bit of extra size and complexity to your files/syntax. Also if you're not familiar with Typescript, it will have a little bit of a learning curve compared to Nexus. All minor issues for me though. Just my thoughts and recent experience with both of these :)
Graphql with nextjs Feb 24, 2024
r/nextjs
2y ago
Would you recommend NX? Sep 26, 2023
r/Frontend
2y ago
NEXUS NOOO Dec 12, 2024
r/outlier_ai
last yr.
More results from reddit.com
🌐
Reddit
reddit.com › r/graphql › replacing nexus
r/graphql on Reddit: Replacing Nexus
June 24, 2022 -

I just finished the State of Graphql survey and the Schema Builders questions got me thinking if I shouldn't be using Nexus? I'm not a huge fan of the errors or the API to write custom types. I'm also using Prisma, so it feels like I'm typing out my types twice every time I add a query or a mutation.

It's okay, but is there a better option? What's your favorite? Why?

These were the options in the survey:

  • Nexus

  • TypeGraphQL

  • Pothos

  • Strawberry

  • Sangria

  • gqlgen

  • Graphql Zeus

  • Genql

  • Graphql Code Generator

Top answer
1 of 5
7
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 .
2 of 5
6
Hey, I'm the author of Pothos. Wanted to add a few things to some of the other comments here. I think Pothos is one of the best options for building type safe GraphQL APIs, but based on your question and other comments here I wanted to point out a few design considerations that may not align with your priorities: Pothos has a strong focus on NOT tying your data to your schema which may go against one of the main issues you mentioned in your initial question. There is a plugin (simple-objects) that lets you define GQL types that don't need type definitions or resolvers, but for the most part Pothos is about mapping your typed data into a graphql API while explicitly defining the shape of the API (rather than inferring it from your data). This means you are often still defining 2 schemas (one for the data, and one for graphql). Most of the time this is fairly transparent, and the shape of the data comes from things like your Prisma schema, a type-safe API client, or from a plugin like simple objects. But for VERY simple APIs this might feel like there is some duplication. What you get in return is great type-safety, great flexibility in how you define your API, a much better path for changing how data is resolved in the future as your backend evolves, and a plugin system that lets you define lots of other pieces inline that previously might have again felt like defining another schema (auth is a great example of this). If you have a simpler use case gqtx is lighter weight, and works very well. If you have a single full stack repo and only care about typescript/web clients trpc gives you an awesome way to define simple rest style API where you have type-safe inputs and outputs with everything flowing through a single endpoint. It doesn't have GraphQLs advanced graph style querying, and doesn't work well if you have clients in other languages, but works great for smaller apps that are full stack typescript.
🌐
Reddit
reddit.com › r/graphql › i've been trying out nexus framework (typescript) for the last days and it seems amazing
r/graphql on Reddit: I've been trying out Nexus Framework (Typescript) for the last days and it seems amazing
September 13, 2020 -

I've been looking for a backend framework for graphql for a while and I'll list the main ones I've tried with the problems I've faced

Nestjs(Graphql) - Not really well documented, had many troubles setting up different stuff, ex: dataloaders, file upload, imported custom scalars, had to bring in a decorator orm, has some code duplication, current choices are TypeORM (which is slowly dying) and MikroORM (which is not very much used compared to typeorm, but seems fine).

Typegraphql - Better documentations and probably bigger community (graphql-wise), same problem as above with the orms and code duplication, has many built-in features that I don't like/use and is relatively slow (or at least it has been in the past, I think it kind of got better now).

Postgraphile - seems like a great option, is perfectly customizable, amazing performance, makes you design the database in a great way and autogenerates logic for crud operations, It's generally definitely a good choice, problem being the tooling around building custom resolvers/gql and postgres which doesn't help too much with the autocomplete (you CAN do it but requires some workarounds from what I understood).

----

Now, what I was looking for was a typescript-first framework that could auto-generate crud mutations/queries but remaining fully customizable while being type-safe and have the possibility to do custom queries to the db with its db layer with as less boilerplate as possible.

Nexus Graphql - nexus uses (with its main plugin at least) prisma2 for its database access, which I personally love, the api is a joy to work with imo. It does have a crud plugin for easily generating FULLY CUSTOMIZABLE crud operations, by fully customizable I mean that you can easily change the input shape as you want, make computed properties or reutilize the full generate query wrapped by your resolver SUPER EASILY, you can reuse the same crud generator with different aliases and customization ,you can pretty much make the vast majority (if not all) of your api by just reutilizing the crud api making nested relations and connections (relay connections as well) easy even in custom resolvers. The api seems a little strange at first but I've started preferring it over decorators after not much, it removes a lot of code duplication while remaining simple and type-safe without even explicitly declaring types, same goes for context and whatever else.

The only part where there is some code duplication is between defining the schema (in the prisma model file) and defining your graphql api (for example, you want to omit the password field in the api), this remains type-safe and with code completion tho, not really a pain.

There are other useful plugins that are easy and with near 0 boilerplate to use, for example authorizing fields, or adding complexity calculator.

It is backed by prisma, the negative part is that it is still not stable (0.26), so it has some breaking changes often, and documentation is not full yet

TLDR: Overall what I love about it is how easy and super fast to build with no boilerplate everything seems to be, while being fully customizable like any other custom server and type-safe db access. Really, seems like everything I was looking for in the past months.

Really, if you like the prisma2 api definitely try this one out, it'll be a joy https://nexusjs.org/, the api seems strange at first, but I promise you'll prefer it over decorators after realizing how much it simplifies things.

DISCLAIMER: I'm not related to nexus or prisma in any way, just a random guy who is loving the framework and hopes its community will grow

🌐
Reddit
reddit.com › r/graphql › making your first nexus + prisma graphql server
r/graphql on Reddit: Making your first Nexus + Prisma GraphQL Server
March 30, 2021 - I think Nexus + Prisma is the best way to make a GraphQL server in 2021. No language has anything that comes close to the speed and functionality that these tools offer!
🌐
Reddit
reddit.com › r/graphql › introducing graphql nexus: code-first graphql server development
r/graphql on Reddit: Introducing GraphQL Nexus: Code-First GraphQL Server Development
February 19, 2020 - Interesting post. I've been using type-graphql which kind of solve some SDL problems although I'm excited to try GraphQL Nexus.
🌐
Reddit
reddit.com › r/graphql › why i prefer graphql.js over typegraphql and graphql nexus
r/graphql on Reddit: Why I prefer GraphQL.js over TypeGraphQL and GraphQL Nexus
September 28, 2020 -

https://medium.com/@pencilflip/graphql-js-vs-typegraphql-vs-graphql-nexus-2a8036deb851

Here are my thoughts on choosing a JavaScript GraphQL implementation. I talk about three popular options - GraphQL.js, TypeGraphQL, and GraphQL Nexus - and why I prefer using GraphQL.js.

🌐
Reddit
reddit.com › r › graphql › comments › axe64o › weekly_discussion_graphql_sdltypegraphqlgraphql
r/graphql - 🚀Weekly Discussion: GraphQL SDL/TypeGraphQL/Graphql Nexus✨
May 3, 2019 -

Let's go round two of weekly discussions. I want to hear your opinions on how you write your GraphQL API.

Graphql SDL

Website • Docs • Github

type-graphql

Website • Docs • Github

TypeGraphQL makes developing a GraphQL API an enjoyable process, i.e. by defining the schema using only classes and a bit of decorator magic.

GraphQL Nexus

Website • Docs • Github

Declarative, code-first and strongly typed GraphQL schema construction for TypeScript & JavaScript

Others:

  • decapi: decapi is set of decorators for creating GraphQL APIs quickly and in type-safe way. Write your types and GQL schema at once killing two birds with one stone.

Next 🚀 Weekly Discussion will be on Apollo and Relay!

Find elsewhere
🌐
Reddit
reddit.com › r › graphql › comments › fyqlzg › graphql_nexus_question
r/graphql - GraphQL Nexus Question
April 10, 2020 - So I was trying to create a mutation, and one of the fields in the input was an enum. When I first wrote it, I forgot to put {required: true} in the …
🌐
Reddit
reddit.com › r/webdev › what do you think about nexus? i'm new at this and wondering if i should use it in my project.
r/webdev on Reddit: What do you think about nexus? I'm new at this and wondering if I should use it in my project.
May 19, 2021 -

Hi! I'm building a project with next.js/prisma/apollo/graphql/typescript stack. I'm relatively new at this stuff, but I'm determined to learn all these technologies.

I keep seeing examples of people using nexus along with this stack, but I don't entirely understand the value it adds. On one hand, I don't need yet another unfamiliar tech to deal with, on another, if it makes things better/easier somehow, I'd do it.

Could someone ELI5 this for me? Should I be learning it and using it in my project?

Top answer
1 of 2
3
Heyy Mahmoud from the Prisma team here 👋🏼 When building GraphQL APIs you need to define two components: The GraphQL schema: you define all operations that your API can do, the different queries /mutations along with their input arguments and their responses. This component acts as the contract between the client and the GraphQL API. The resolvers for each query and mutation: you define the implementation detail for each query and mutation. So here you would use Prisma to do CRUD operations for example. There are generally two possible workflows when creating these two components: schema-first and code-first. For schema-first development (or SDL-first) you need to write the GraphQL schema (using GraphQL’s SDL (Schema Definition Language)) and then define the resolvers. As APIs grew in complexity, this workflow showed some challenges that made it necessary to adopt additional GraphQL tools: Schema definition and resolvers can accidentally become out-of-sync: It’s hard to make sure that the resolver matches the same structure as the schema and vice-versa. A tool like GraphQL Code Generator, which generates resolvers from your schema solves this challenge. GraphQL schema is defined as strings, so to get features like auto-completion and build-time error checks for your SDL code requires additional tooling. So while this approach works, you will need to use a combination of supporting tools. On the other hand, you can use a code-first workflow to build your GraphQL API. In this approach, you define your schema using code and you then generate the SDL schema. This workflow offers a great Developer Experience because you can get auto-completion and type-checking (if you’re using a strongly-typed language like TypeScript). the generated GraphQL schema can be checked into version control to make it easy to track changes to the API during the development process. Both approaches work, but personally, I prefer code-first. We have examples for SDL-first API and an API using Nexus at https://github.com/prisma/prisma-examples
2 of 2
2
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).
🌐
Reddit
reddit.com › r/graphql › what are your thoughts on a backend tech-stack for graphql with nodejs?
r/graphql on Reddit: What are your thoughts on a backend tech-stack for GraphQL with NodeJS?
February 2, 2021 -

Hey guys!

I recently started using GraphQL with TypeORM and Type-GraphQL and absolutely loved it!
Now I stumbled upon NestJS and thought it looked interesting aswell.

What tech-stack would you recommend for NodeJS projects with GraphQL in 2021?

Top answer
1 of 5
5
About half a year ago I started using the TypeGraphQL + TypeORM stack to start working with GraphQL instead of REST. Before that I had been using Laravel, ASP.NET Core and Flask mostly. Then I founded a start-up with a friend and we have been focusing on building fullstack applications in the education sector, using GraphQL as our primary interface to the backend as well. As the CTO I decided that our stack is going to be based on Typescript, SQL, and GraphQL as well for rapid development and an easier time with hosting. But the combination of TypeGraphQL using Apollo server, and TypeORM alone is still a little unstructured for my tastes and NestJS hit the nail for our needs. It uses dependency injection, has integrated testing and builds on top of many well-known, and battle-tested, Javascript libraries such as Passport.js, TypeORM, and TypeGraphQL. I absolutely love it and the docs are really well thought-out. I definitely recommend it! Feel free to message me if you need any more tips!
2 of 5
3
For backend APIs and services, I personally use TypeScript, GraphQL Nexus, Prisma, and Apollo Server (specifically, apollo-server-express). I am a big fan of GraphQL Nexus and think it has a lot of potential, though the documentation and support are pretty lacking, and development is slow (especially relative to projects like TypeGraphQL, which you and u/Dan6erbond mentioned). It is a struggle finding resources for it, so I have found myself reading the source code and internal JSDoc a lot. Little things can be confusing, such as the multiple ways to create a non-nullable field in Nexus, not to mention the global nullable/non-nullable switch. I will say that once you start to use it more, it does become second nature and much more comfortable, but there is nothing like using a project with really thorough documentation, a strong community, and clear guidelines/patterns. I have used TypeGraphQL + TypeORM, and it didn't quite fit for me. I think the main issue is that I like object composition more than classes/inheritance/OOP though I do think TypeORM/TypeGraphQL is more robust. I have never used NestJS but have considered using it, and would love to hear thoughts on it.
🌐
Reddit
reddit.com › r › programming › comments › igb48g › codefirst_graphql_server_development_with_graphql
r/programming - Code-first GraphQL server development with GraphQL Nexus
August 25, 2020 - The latter builds on top of Nexus Schema and simplifies the process by adding a web server (on top of Express) and testing capabilities, whereas the former only creates the GraphQL schema (and you need to set up the server manually, using something like Apollo Server).
🌐
Reddit
reddit.com › r › graphql › comments › aqmhdw › using_graphql_nexus_with_a_database
r/graphql - 🚀Using GraphQL Nexus with a Database
February 16, 2019 - great article and explanation! it really drives me to convert our graphql-yoga + prisma schema first setup to graphql-nexus ... A place for interesting and informative GraphQL content and discussions. ... Reddit Inc © 2022.
🌐
Reddit
reddit.com › r/graphql › using apollo, prisma, and nexus with react in an nx workspace
Using Apollo, Prisma, and Nexus with React in an Nx Workspace : r/graphql
May 25, 2021 - 22K subscribers in the graphql community. A place for interesting and informative GraphQL content and discussions.
🌐
Reddit
reddit.com › r/graphql › nexus and directive
r/graphql on Reddit: Nexus and directive
March 29, 2021 -

Has anyone a good way to use directives with nexus?

🌐
Reddit
reddit.com › r › graphql › comments › g1fadp › graphql_nexus_authentication
r/graphql - GraphQL Nexus Authentication
April 15, 2020 - Hi all! I’m having a lot of difficulty using JWTs stored in cookies for authentication with GraphQL Nexus, and I was wondering if anyone had any …
🌐
Reddit
reddit.com › r/graphql › help with graphql nexus objecttypes.
r/graphql on Reddit: Help with graphql nexus objectTypes.
April 14, 2021 -

I'm a little new to nexus and I'm a bit confused about what objectType() is meant for. My assumption was that it's simply meant for defining a scheme type but I've seen a lot of examples where a resolver is included in the object type. For example:

const User = objectType({
  name: 'User',
  definition(t) {
    t.int('id', { description: 'Id of the user' })
    t.string('fullName', { description: 'Full name of the user' })
    t.field('status', { type: StatusEnum })
    t.list.field('posts', {
      type: Post, // or "Post"
      resolve(root, args, ctx) {
        return ctx.getUser(root.id).posts()
      },
    })
  },
})

Why would we include a resolver here? Shouldn't we do that in a separate queryType()? Any help would be appreciated.

🌐
Reddit
reddit.com › r/graphql › can someone help me with nexus js when using relationships?
Can someone help me with Nexus JS when using Relationships? : r/graphql
July 17, 2021 - Your Author model defines a property called „book“. Your Nexus object type defines a property called „books“. I guess the naming has to be the same. So, try use the same naming of the properties of your models and your object types. Reply · subscribers · ShaharBinyamin · • · RecognitionDecent266 · • · spring.io · Katastrophenmagnet · • · rynmgdlno · • · Animatrix_Mak · • · 365682 · • · aetherspace-one · • · ArturCzemiel · • · graphqlai ·
🌐
Reddit
reddit.com › r/graphql › any roundup of the major graphql/orm frameworks out there?
r/graphql on Reddit: Any roundup of the major GraphQL/ORM frameworks out there?
February 11, 2019 -

I'm not talking Apollo vs Yoga. There's a handful of higher level frameworks out there, and I'd like to see them all compared. For instance: Vesper, TypeGraphql, Loopback, Prisma, and Nestjs all seem to be duking it out.

I'm not sure exactly what the value propositions are for these different options - or if they're even comparable.

🌐
Reddit
reddit.com › r/graphql › nexus with cursor pagination
r/graphql on Reddit: Nexus with cursor pagination
July 6, 2022 -

I just recently started using Nexus and Prisma. Loving it so far, but have had a tough time figuring out cursor pagination. Does anyone have any examples/tutorials they're willing to share? The only tutorial I've really been able to find is this: https://www.youtube.com/watch?v=Pr2nee9aBKw