Skip to content

Commit

Permalink
Less GraphQL Mesh naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Aug 28, 2024
1 parent 3bf14b3 commit a53f606
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/serve-runtime/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ interface GatewayConfigBase<TContext extends Record<string, any>> {
*/
transportEntries?: TransportEntryAdditions;
/**
* Mesh plugins that are compatible with GraphQL Yoga, envelop and Mesh.
* Gateway plugins that are compatible with GraphQL Yoga, envelop and Mesh.
*/
plugins?(context: GatewayConfigContext): (
| EnvelopPlugin
Expand Down
8 changes: 4 additions & 4 deletions website/src/pages/docs/guides/monitoring-and-tracing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ description:
If something is not working as it should within your GraphQL gateway, you would not want it to go
unnoticed.

You can use GraphQL Mesh plugins to trace and monitor your gateway's execution flow together with
all outgoing HTTP calls and internal query planning.
You can use Gateway plugins to trace and monitor your gateway's execution flow together with all
outgoing HTTP calls and internal query planning.

> GraphQL Mesh plugins are mostly the extended versions of
> Gateway plugins are mostly the extended versions of
> [the existing Envelop plugins.](https://www.envelop.dev/docs/guides/monitoring-and-tracing)
## Mesh plugins
## Gateway plugins

- **StatsD**: collect and send metrics to Datadog's DogStatsD and InfluxDB's Telegraf StatsD
services. [Read more](/docs/plugins/statsd)
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/docs/plugins/plugins-introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
description:
Discover a world of possibilities with GraphQL Mesh plugins! Extend your capabilities with mock,
Discover a world of possibilities with Gateway plugins! Extend your capabilities with mock,
caching, and more. Envelop also offers customizable plugins for a faster GraphQL API.
---

import { Callout } from '@theguild/components'

# Plugins

GraphQL Mesh can gain new capabilities by using plugins.
The gateway can gain new capabilities by using plugins.

```yaml filename=".meshrc.yaml"
plugins:
Expand Down
6 changes: 3 additions & 3 deletions website/src/pages/v1/serve/deployment/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Docker is a tool that allows you to package an application and its dependencies
that can run on any system. This makes it easy to deploy applications in a consistent and
reproducible way, regardless of the underlying infrastructure.

To simplify running GraphQL Mesh, you can use the Docker image and the Docker Compose template we
provide. This setup allows you to easily configure and run the gateway without the need to install
Node.js and the required mesh npm packages.
To simplify running your GraphQL gateway, you can use the Docker image and the Docker Compose
template we provide. This setup allows you to easily configure and run the gateway without the need
to install Node.js and the required gateway npm packages.

## Prerequisites

Expand Down
10 changes: 5 additions & 5 deletions website/src/pages/v1/serve/features/custom-plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ GraphQL Mesh uses
different phases of the GraphQL execution to manipulate or track the entire workflow step-by-step.

<Callout>
You can both use Yoga or Envelop or Mesh plugins with GraphQL Mesh.
You can both use Yoga or Envelop or Gateway plugins with your GraphQL Gateway.
But you should always opt-in for the Mesh variant of the plugin, then Yoga then Envelop because each of them have more control over the execution.
For example, Yoga variant of the plugin leverage HTTP hooks, and Mesh one can leverage more hooks and more control over the context.

We'd recommend to check the features of GraphQL Mesh first, and if you can't find what you are
We'd recommend to check the features of the gateway first, and if you can't find what you are
looking for, then you can use this option on your own to add plugins from either GraphQL Yoga or
[Envelop's Plugin Hub](https://the-guild.dev/graphql/envelop/plugins).

Expand All @@ -40,16 +40,16 @@ Sometimes you might want to build your own plugins. You can write your own Mesh
share it with other people by publishing it to `npm`.

<Callout>
A good entry-point for discovering how to write Mesh plugins is to look at the source code of the
existing plugins maintained by us.
A good entry-point for discovering how to write Gateway plugins is to look at the source code of
the existing plugins maintained by us.
</Callout>

The most hooks for Mesh origin from the Envelop and Yoga plugin systems.
[Please refer to the Envelop Plugin Lifecycle documentation for more information.](https://the-guild.dev/graphql/envelop/docs/plugins/lifecycle)
and
[Yoga Plugin Lifecycle documentation](https://the-guild.dev/graphql/yoga-server/docs/features/envelop-plugins).
In addition, Yoga adds more HTTP specific hooks while Mesh adds more related to the subgraph
execution. GraphQL Mesh plugins also uses
execution. Gateway plugins also uses
[Explicit Resource Management](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html),
so all the resources are cleaned up gracefully when Mesh gateway is shut down. You can see
`Symbol.asyncDispose` below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import { Callout } from '@theguild/components'
If something is not working as it should within your GraphQL gateway, you would not want it to go
unnoticed.

You can use GraphQL Mesh plugins to trace and monitor your gateway's execution flow together with
all outgoing HTTP calls and internal query planning.
You can use Gateway plugins to trace and monitor your gateway's execution flow together with all
outgoing HTTP calls and internal query planning.

> GraphQL Mesh plugins are mostly the extended versions of
> Gateway plugins are mostly the extended versions of
> [the existing Envelop plugins.](https://www.envelop.dev/docs/guides/monitoring-and-tracing)
## Available Plugins
Expand Down

0 comments on commit a53f606

Please sign in to comment.