mercurius VS gRPC

Compare mercurius vs gRPC and see what are their differences.

mercurius

Implement GraphQL servers and gateways with Fastify (by mercurius-js)

gRPC

The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) (by grpc)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
mercurius gRPC
22 201
2,300 40,685
1.0% 0.9%
7.9 9.9
10 days ago 6 days ago
JavaScript C++
MIT License Apache License 2.0
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.

mercurius

Posts with mentions or reviews of mercurius. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-08.
  • The Road to GraphQL At Enterprise Scale
    6 projects | dev.to | 8 Nov 2023
    GraphQL Gateway is primarily responsible for serving GraphQL queries to consumers. It takes a query from a client, breaks it into smaller sub-queries, and executes that plan by proxying calls to the appropriate downstream subgraphs. When we started our journey, there was only Apollo Federation in the arena, and we used it. Still, now you can look at other options (e.g. Mercurius, Conductor, Hot Chocolate, Wundergraph, Hasura Remote Schemas), compare benchmarks and decide what's important and preferable for your needs. The Gateway provides a unified API for consumers while giving backend engineers flexibility and service isolation.
  • Dynamic GraphQL queries with Mercurius
    3 projects | dev.to | 17 Sep 2023
    If you're using Fastify with Mercurius as your GraphQL adapter, you may be looking for some advanced usages. In this article, we'll explore a real world example with Dynamic GQL queries with Mercurius.
  • How to use DataLoader with Mercurius GraphQL
    3 projects | dev.to | 5 Aug 2023
    Loader: it is a built-in DataLoader-Like solution that is quick to set up and use.
  • Simple example with NestJS and Mercurius 😻
    3 projects | dev.to | 25 Jan 2023
    In this post I will show you how to implement NestJS😻 with GraphQL in code first mode, using Mercurius and the "platform" to Fastify.
  • Barrel Exports considered harmful
    4 projects | dev.to | 4 Dec 2022
    What this does is to overwrite or augment the types exposed by the pointed module, and can be used (for example) when relying on autogenerated code. One interesting case of this is GraphQL to TypeScript code generation, and how this is integrated with the amazing Mercurius library (made by some of my colleagues at NearForm! 😜).
  • Apollo Server v4 Breaking Changes. Time to move away?
    4 projects | dev.to | 3 Dec 2022
    When moving away from Apollo Server, and you're looking for a replacement built with JavaScript or TypeScript, let me give you some options. If you want to keep building your GraphQL API schema first, you might want to consider Mercurius (which relies on Fastify) or GraphQL Yoga. If you're going to build your GraphQL API code or resolver first, have a look at TypeGraphQL or Nexus. Alternatively, there are great GraphQL-as-a-Service solutions such as StepZen in case you no longer want to build, maintain and host your own GraphQL API.
  • Fastify DX and SolidJS in the Real World
    12 projects | dev.to | 20 Jul 2022
    Let's start with data. We live in amazing times and it's really easy and cheap (or free) to get started with storing and working with data online. Take for example a PlanetScale MySQL-compatible database, Fastify Node.js Server, Prisma database mapper and a GraphQL connector like Mercurius and you have an entire backend stack. For this example we assume you already have a backend or you want to connect to a 3rd party database like the GitHub GraphQL API.
  • Nest JS With Graphql World
    9 projects | dev.to | 16 Mar 2022
    In this chapter, we assume a basic understanding of GraphQL and focus on how to work with the built-in @nestjs/graphql module. The GraphQLModule can be configured to use Apollo server (with the @nestjs/apollo driver) and Mercurius (with the @nestjs/mercurius). We provide official integrations for these proven GraphQL packages to provide a simple way to use GraphQL with Nest. You can also build your own dedicated driver (read more on that here).
  • Shill me on Apollo client.
    2 projects | /r/reactjs | 25 Jan 2022
    Why would I want to use Apollo Client? So far in my career I have used some server graphql scaffolding (webonyx/graphql-php for PHP and mercurius for Node) and just used the fetch API (or whatever ajax API around XMLHttpRequest) against that server with the body being an object with
  • Are there actually better alternatives than Apollo server?
    7 projects | /r/graphql | 16 Jan 2022
    Only for people who are clueless. Apollo server is probably the worst node.js server to use for your graphql schema. It's terribly slow. You should look into https://mercurius.dev

gRPC

Posts with mentions or reviews of gRPC. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-03.
  • Golang: out-of-box backpressure handling with gRPC, proven by a Grafana dashboard
    4 projects | dev.to | 3 Apr 2024
    gRPC, built on HTTP/2, inherently supports flow control. The server can push updates, but it must also respect flow control signals from the client, ensuring that it doesn't send data faster than what the client can handle.
  • Reverse Engineering Protobuf Definitions from Compiled Binaries
    5 projects | news.ycombinator.com | 9 Mar 2024
    Yes, grpc_cli tool uses essentially the same mechanism except implemented as a grpc service rather than as a stubby service. The basic principle of both is implementing the C++ proto library's DescriptorDatabase interface with cached recursive queries of (usually) the server's compiled in FileDescriptorProtos.

    See also https://github.com/grpc/grpc/blob/master/doc/server-reflecti...

    The primary difference between what grpc does and what stubby does is that grpc uses a stream to ensure that the reflection requests all go to the same server to avoid incompatible version skew and duplicate proto transmissions. With that said, in practice version skew is rarely a problem for grpc_cli style "issue a single RPC" usecases: even if requests do go to two or more different versions of a binary that might have incompatible proto graphs, it is very common for the request and response and RPC to all be in the same proto file so you only need to make one RPC in the first place unless you're using an extension mechanism like proto2 extensions or google.protobuf.Any.

  • Delving Deeper: Enriching Microservices with Golang with CloudWeGo
    7 projects | dev.to | 22 Feb 2024
    While gRPC and Apache Thrift have served the microservice architecture well, CloudWeGo's advanced features and performance metrics set it apart as a promising open source solution for the future.
  • gRPC Name Resolution & Load Balancing on Kubernetes: Everything you need to know (and probably a bit more)
    5 projects | dev.to | 6 Feb 2024
    The loadBalancingConfig is what we use in order to decide which policy to go for (round_robin in this case). This JSON representation is based on a protobuf message, then why does the name resolver returns it in the JSON format? The main reason is that loadBalancingConfig is a oneof field inside the proto message and so it can not contain values unknown to the gRPC if used in the proto format. The JSON representation does not have this requirement so we can use a custom loadBalancingConfig .
  • Dart on the Server: Exploring Server-Side Dart Technologies in 2024
    4 projects | dev.to | 30 Jan 2024
    The Dart implementation of gRPC which puts mobile and HTTP/2 first. It's built and maintained by the Dart team. gRPC is a high-performance RPC (remote procedure call) framework that is optimized for efficient data transfer.
  • Usando Spring Boot RestClient
    4 projects | dev.to | 30 Jan 2024
  • How to Build & Deploy Scalable Microservices with NodeJS, TypeScript and Docker || A Comprehesive Guide
    13 projects | dev.to | 25 Jan 2024
    gRPC is a high-performance, open-source RPC (Remote Procedure Call) framework initially developed by Google. It uses Protocol Buffers for serialization and supports bidirectional streaming.
  • Actual SSH over HTTPS
    9 projects | news.ycombinator.com | 23 Dec 2023
    In general, tunneling through HTTP2 turns out to be a great choice. There is a RPC protocol built on top of HTTP2: gRPC[1].

    This is because HTTP2 is great at exploiting a TCP connection to transmit and receive multiple data structures concurrently - multiplexing.

    There may not be a reason to use HTTP3 however, as QUIC already provides multiplexing.

    I expect that in the future most communications will be over encrypted HTTP2 and QUIC simply because middleware creators can not resist to discriminate.

    [1] <https://grpc.io>

  • Why gRPC is not natively supported by Browsers
    1 project | dev.to | 17 Dec 2023
    Even in the https://grpc.io blog says this
  • SGSG (Svelte + Go + SQLite + gRPC) - open source application
    5 projects | /r/sveltejs | 6 Dec 2023
    gRPC

What are some alternatives?

When comparing mercurius and gRPC you can also consider the following projects:

apollo-server - 🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.

ZeroMQ - ZeroMQ core engine in C++, implements ZMTP/3.1

graphql-helix - A highly evolved GraphQL HTTP Server 🧬

Apache Thrift - Apache Thrift

subscriptions-transport-ws - :arrows_clockwise: A WebSocket client + server for GraphQL subscriptions

Cap'n Proto - Cap'n Proto serialization/RPC system - core tools and C++ library

graphql-tools - :wrench: Utility library for GraphQL to build, stitch and mock GraphQL schemas in the SDL-first approach

zeroRPC - zerorpc for python

graphql-js - A reference implementation of GraphQL for JavaScript

rpclib - rpclib is a modern C++ msgpack-RPC server and client library

graphql-mesh - The Graph of Everything - Federated architecture for any API service

nanomsg - nanomsg library