Need advice about which tool to choose?Ask the StackShare community!

graphql-yoga

95
144
+ 1
3
Prisma

1.1K
954
+ 1
54
Add tool

Prisma vs graphql-yoga: What are the differences?

  1. ORM vs. Server Library: Prisma is primarily an ORM (Object-Relational Mapping) tool that provides a query builder and database client, enabling developers to interact with databases easily. On the other hand, graphql-yoga is a server library that helps in creating a GraphQL server with various features like schema generation, resolvers, and Middleware.

  2. Database Integration: Prisma integrates with databases directly by generating a client that communicates with the database. It abstracts away the database layer and provides a type-safe API for database operations. In contrast, graphql-yoga allows developers to integrate any database of their choice by writing custom resolvers to handle data fetching and manipulation.

  3. Development Focus: Prisma focuses on simplifying database access and management, providing tools for data modeling, migrations, and advanced queries. It is more suitable for projects that heavily rely on database operations. On the other hand, graphql-yoga is focused on building GraphQL APIs and managing server-side logic with features like subscriptions, data loaders, and error handling.

  4. Server Environment: Prisma requires a separate server environment to run queries and interact with databases, making it suitable for backend applications. In contrast, graphql-yoga can be used for both frontend and backend development as it is responsible for handling GraphQL requests and responses on the server-side.

  5. Community Support: Prisma has a growing community of developers that contribute to its development and provide support through forums, documentation, and tutorials. graphql-yoga, being built on top of popular libraries like Express and Apollo Server, benefits from the vast community of these tools, providing extensive resources for troubleshooting and development.

  6. Ease of Use: Prisma simplifies database operations with its type-safe API, query builder, and schema migrations, making it easier for developers to work with databases. graphql-yoga, with its declarative approach to defining schemas and resolvers, simplifies the process of creating a GraphQL server with minimal boilerplate code, enhancing developer productivity.

In Summary, Prisma is primarily focused on database access and management through an ORM approach, while graphql-yoga specializes in building GraphQL servers with features like schema generation and resolvers, catering to different aspects of GraphQL development.

Decisions about graphql-yoga and Prisma

Hey guys,

My backend set up is Prisma / GraphQL-Yoga at the moment, and I love it. It's so intuitive to learn and is really neat on the frontend too, however, there were a few gotchas when I was learning! Especially around understanding how it all pieces together (the stack). There isn't a great deal of information out there on exactly how to put into production my set up, which is a backend set up on a Digital Ocean droplet with Prisma/GraphQL Yoga in a Docker Container using Next & Apollo Client on the frontend somewhere else. It's such a niche subject, so I bet only a few hundred people have got a website with this stack in production. Anyway, I wrote a blog post to help those who might need help understanding it. Here it is, hope it helps!

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of graphql-yoga
Pros of Prisma
  • 3
    Easy to setup. No boilerplate code
  • 12
    Type-safe database access
  • 10
    Open Source
  • 8
    Auto-generated query builder
  • 6
    Supports multible database systems
  • 6
    Increases confidence during development
  • 4
    Built specifically for Postgres and TypeScript
  • 4
    Productive application development
  • 2
    Supports multible RDBMSs
  • 2
    Robust migrations system

Sign up to add or upvote prosMake informed product decisions

Cons of graphql-yoga
Cons of Prisma
    Be the first to leave a con
    • 2
      Doesn't support downward/back migrations
    • 1
      Doesn't support JSONB
    • 1
      Do not support JSONB
    • 1
      Mutation of JSON is really confusing
    • 1
      Do not support JSONB

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is graphql-yoga?

    Easiest way to run a GraphQL server: Sensible defaults & includes everything you need with minimal setup.;Includes Subscriptions: Built-in support for GraphQL subscriptions using WebSockets.;Compatible: Works with all GraphQL clients (Apollo, Relay...) and fits seamless in your GraphQL workflow.

    What is Prisma?

    Prisma is an open-source database toolkit. It replaces traditional ORMs and makes database access easy with an auto-generated query builder for TypeScript & Node.js.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use graphql-yoga?
    What companies use Prisma?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with graphql-yoga?
    What tools integrate with Prisma?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to graphql-yoga and Prisma?
    GraphQL
    GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.
    Apollo
    Build a universal GraphQL API on top of your existing REST APIs, so you can ship new application features fast without waiting on backend changes.
    JavaScript
    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
    Python
    Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
    Node.js
    Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
    See all alternatives