Software Alternatives, Accelerators & Startups

graphql-yoga VS JSON Server

Compare graphql-yoga VS JSON Server and see what are their differences

graphql-yoga logo graphql-yoga

🧘 Fully-featured GraphQL Server with focus on easy setup, performance & great developer experience - prisma-labs/graphql-yoga

JSON Server logo JSON Server

Get a full fake REST API with zero coding in less than 30 seconds. For front-end developers who need a quick back-end for prototyping and mocking
  • graphql-yoga Landing page
    Landing page //
    2023-08-28
  • JSON Server Landing page
    Landing page //
    2023-08-01

graphql-yoga features and specs

  • Simplicity
    graphql-yoga offers an easy setup and minimal configuration requirements, making it accessible for developers who want to quickly start building GraphQL APIs without extensive boilerplate.
  • Performance
    Built on top of modern GraphQL conventions and tools like graphql-js and Express, graphql-yoga delivers good performance, efficiently handling GraphQL requests.
  • Subscriptions Support
    Out of the box, graphql-yoga supports GraphQL subscriptions, enabling real-time capabilities in applications without needing additional setup.
  • Compatibility
    It is highly compatible with other tools and libraries in the GraphQL ecosystem, making it easy for developers to integrate it with existing workflows and tools.
  • Community and Documentation
    graphql-yoga benefits from a robust community and comprehensive documentation, providing users with numerous resources to overcome challenges and expand their use cases.

Possible disadvantages of graphql-yoga

  • Limited Customization
    While graphql-yoga is easy to set up, it may offer less flexibility in customizing server behavior compared to manually setting up GraphQL servers using lower-level libraries.
  • Middleware Limitations
    Integrating custom middleware or advanced configurations can be more challenging due to the abstraction layer that graphql-yoga provides.
  • Updates and Maintenance
    As with any library, reliance on a specific tool's ecosystem can be risky if the library becomes unmaintained, though as of now, graphql-yoga is actively maintained.
  • Opinionated Structure
    graphql-yoga's design philosophy might not align with every project's architectural preferences, especially when custom flow control or library integrations are a priority.

JSON Server features and specs

  • Ease of Setup
    JSON Server can be set up quickly with minimal configuration, making it ideal for prototyping and rapid development. It allows developers to have a fully functioning REST API within minutes.
  • RESTful API
    It provides a standard RESTful API out of the box, allowing developers to perform all CRUD operations. This is helpful for simulating a real-world server while testing client-side applications.
  • Customization
    JSON Server supports middlewares, routes, and custom rules, allowing developers to customize the behavior and structure of the API to better suit their needs.
  • Fakes Backend Data
    It's great for simulating backend responses without needing a real backend setup, useful in front-end development to test components and interactions.
  • Lightweight
    As a lightweight server, it requires fewer resources and is quite simple compared to setting up a full-fledged backend server.

Possible disadvantages of JSON Server

  • Not for Production
    JSON Server is designed for development and testing. It is not suitable for production use due to performance limits and lack of robust security features.
  • Limited Functionality
    While JSON Server is great for basic CRUD operations, it lacks advanced features like authentication, authorization, and complex querying.
  • Data Persistence
    Data is stored in a JSON file, and while this is convenient for testing, it is not suitable for applications that require persistent and scalable data storage.
  • In-memory Limitations
    Being an in-memory server, it may have issues with handling large datasets or complex data structures efficiently.
  • Manual Data Reset
    Any changes made to the JSON file while the server is running require manual resets or reloads to reflect in the API, which can be cumbersome during continuous development cycles.

graphql-yoga videos

No graphql-yoga videos yet. You could help us improve this page by suggesting one.

Add video

JSON Server videos

Angular CRUD with Web API Tutorial Part #3 - Setup Local JSON Server and Mock API Endpoints

Category Popularity

0-100% (relative to graphql-yoga and JSON Server)
GraphQL
100 100%
0% 0
Development
0 0%
100% 100
Application And Data
100 100%
0% 0
API Tools
0 0%
100% 100

User comments

Share your experience with using graphql-yoga and JSON Server. For example, how are they different and which one is better?
Log in or Post with

Social recommendations and mentions

Based on our record, JSON Server should be more popular than graphql-yoga. It has been mentiond 45 times since March 2021. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

graphql-yoga mentions (8)

  • Show HN: Dumbo – Hono inspired framework for PHP
    You're talking about the implementation of the protocol, right? That is a good implementation of it, called GraphQL Yoga[0] However I'm concerned there is a slight disconnect here. I'm saying that the technical specification of GraphQL does not lend itself to being bad, rather its the failure of developers to really understand its purpose and what its for (its a giant aggregator, with various ways to optimally... - Source: Hacker News / 6 months ago
  • Comparing Hattip vs. Express.js for modern app development
    Graphql: GraphQL middleware that wraps the GraphQL Yoga library. - Source: dev.to / 12 months ago
  • We built a database UI for Postgres with an instant GraphQL API
    It's easy to do with a Serverless Function and with GraphQL Yoga. Source: over 2 years ago
  • How to Build a Type-safe GraphQL API using Pothos and Kysely
    In today's article we are going to create a GraphQL api using the Koa framework together with the GraphQL Yoga library and Pothos. In addition, we will use Kysely, which is a query builder entirely written in TypeScript. - Source: dev.to / over 2 years ago
  • Announcing GraphQL Yoga 2.0!
    We can't wait to get your questions, user feedback, and feature requests/PRs, and we already plan for new features such as an Enhanced Plugin System that will provide features similar to Envelop but at the request level. - Source: dev.to / about 3 years ago
View more

JSON Server mentions (45)

  • Building a CRUD app with React Query, TypeScript, and Axios
    We'll be using json-server to create the REST API that we'll fetch data from. In the root of the project, create a db.json file with the contents. - Source: dev.to / 11 months ago
  • Full Stack To Do list, a step-by-step tutorial
    Our backend will be little more than a two-way translation layer between the database and the user interface (UI). Later in this post we will identify other responsibilities of a backend but our implementation will be kept simple to demonstrate the fundamental machinery and concepts. It is worth noting the backend comes in two parts, web server and application server. Both json-server and Express are able to... - Source: dev.to / almost 2 years ago
  • Improve Frontend-Backend development harmony with JSON-Server
    JSON-Server creates fake REST API with a minimum amount of configuration, it provides a simple way to create mock RESTful APIs and easily define the required endpoints, allows easy definition of the data schema in a JSON file and can serve as a reference for each figure in the project. - Source: dev.to / almost 2 years ago
  • Dictionary app
    I thought about usingJson Server (hosting the repo with the words on Github to begin with), Googlesheets, or maybe Firestore (i would prefer not to use it ,to avoid extra costs just in case it gets a reasonable amount of users). It isnt a big app so I just want a simple solution for storing the words and fetching them. Source: almost 2 years ago
  • Playwright - Not just for Frontend
    First, I didn't create a backend API for this example, but I used a fake API to test. I created it with json-server and json-server-auth. They are two npm packages that use a JSON file as a database and expose the database in an API. You can find more about json-server in its documentation and about json-server-auth here. - Source: dev.to / about 2 years ago
View more

What are some alternatives?

When comparing graphql-yoga and JSON Server, you can also consider the following products

GraphQL Voyager - GraphQL Voyager – Represent Any GraphQL API as an Interactive Graph

JSON Placeholder - JSON Placeholder is a modern platform that provides you online REST API, which you can instantly use whenever you need any fake data.

GraphQl Editor - Editor for GraphQL that lets you draw GraphQL schemas using visual nodes

ReqRes - A hosted REST-API ready to respond to your AJAX requests.

Hasura - Hasura is an open platform to build scalable app backends, offering a built-in database, search, user-management and more.

Mockae - The most flexible way to mock REST APIs with Lua code execution