On this page

@graphql-mesh/transport-grpc

Changelog for @graphql-mesh/transport-grpc: every release with its changes and the pull requests behind them.

0.7.0

Minor Changes

  • #9650 c7f0f3f Thanks @ardatan! - gRPC: pass channelOptions through to the gRPC client

    Use this for message size limits, keepalive, and other channel args. Options are stored as entries so dotted keys like grpc.max_receive_message_length stay GraphQL-safe in the composed schema.

    import { defineConfig } from '@graphql-mesh/compose-cli'
    import loadGrpcSubgraph from '@omnigraph/grpc'
    
    export const composeConfig = defineConfig({
      subgraphs: [
        {
          sourceHandler: loadGrpcSubgraph('MyGrpcApi', {
            endpoint: 'localhost:50051',
            channelOptions: {
              'grpc.max_receive_message_length': 10_000_000,
              'grpc.keepalive_time_ms': 10_000,
              'grpc.keepalive_timeout_ms': 5_000,
              'grpc.keepalive_permit_without_calls': 1
            }
          })
        }
      ]
    })

    Legacy Mesh:

    sources:
      - name: MyGrpcApi
        handler:
          grpc:
            endpoint: localhost:50051
            channelOptions:
              grpc.max_receive_message_length: 10000000
              grpc.keepalive_time_ms: 10000
  • #9650 c7f0f3f Thanks @ardatan! - gRPC: add reflectionMetadata for server-reflection requests

    Send routing / auth metadata only when loading the schema via gRPC reflection (no source). Runtime RPC metadata remains metaData; HTTP headers for a remote .graphql SDL remain schemaHeaders.

    import { defineConfig } from '@graphql-mesh/compose-cli'
    import loadGrpcSubgraph from '@omnigraph/grpc'
    
    export const composeConfig = defineConfig({
      subgraphs: [
        {
          sourceHandler: loadGrpcSubgraph('MyGrpcApi', {
            endpoint: 'localhost:50051',
            // No `source` → schema loaded via reflection
            reflectionMetadata: {
              'grpc-service': 'proto.MyGrpcService',
              authorization: 'Bearer {env.REFLECTION_TOKEN}'
            }
          })
        }
      ]
    })

    Legacy Mesh:

    sources:
      - name: MyGrpcApi
        handler:
          grpc:
            endpoint: localhost:50051
            reflectionMetadata:
              grpc-service: proto.MyGrpcService
              authorization: 'Bearer {env.REFLECTION_TOKEN}'
  • #9650 c7f0f3f Thanks @ardatan! - gRPC: apply requestTimeout as a real per-call deadline

    Previously requestTimeout was not enforced as a gRPC deadline, so a hung upstream could leave the GraphQL request waiting indefinitely. It is now set on each call via CallOptions.deadline (Date.now() + requestTimeout).

    import { defineConfig } from '@graphql-mesh/compose-cli'
    import loadGrpcSubgraph from '@omnigraph/grpc'
    
    export const composeConfig = defineConfig({
      subgraphs: [
        {
          sourceHandler: loadGrpcSubgraph('MyGrpcApi', {
            endpoint: 'localhost:50051',
            // Fail the call if the server does not respond within 5s
            requestTimeout: 5000
          })
        }
      ]
    })

    Legacy Mesh:

    sources:
      - name: MyGrpcApi
        handler:
          grpc:
            endpoint: localhost:50051
            requestTimeout: 5000

Patch Changes

  • #9650 c7f0f3f Thanks @ardatan! - gRPC: tear down clients via Client.prototype.close

    If a service defines an RPC named Close, that method was previously shadowing the gRPC client’s connection close(), so Mesh could not dispose the channel cleanly. Teardown now always calls Client.prototype.close.

    No config change is required — services with a Close RPC continue to expose that operation in the GraphQL schema, while gateway/Mesh shutdown still closes the underlying connection.

  • #9650 c7f0f3f Thanks @ardatan! - gRPC: surface ServiceError as GraphQL errors with extensions.grpc

    Upstream gRPC ServiceErrors are no longer masked as generic internal errors. They are returned as GraphQL errors with extensions.code: DOWNSTREAM_SERVICE_ERROR and structured details under extensions.grpc:

    {
      "errors": [
        {
          "message": "4 DEADLINE_EXCEEDED: Deadline exceeded",
          "extensions": {
            "code": "DOWNSTREAM_SERVICE_ERROR",
            "grpc": {
              "code": 4,
              "status": "DEADLINE_EXCEEDED",
              "details": "Deadline exceeded",
              "metadata": {}
            }
          }
        }
      ]
    }

    Only gRPC ServiceError values are wrapped; other thrown values are left unchanged.

  • Updated dependencies [c7f0f3f, c7f0f3f]:

    • @graphql-mesh/types@0.107.1
    • @graphql-mesh/utils@0.107.1

0.6.0

Patch Changes

  • Updated dependencies [ab73b38, 51b15f4]:
    • @graphql-mesh/types@0.107.0
    • @graphql-mesh/utils@0.107.0

0.5.0

Patch Changes

0.4.1

Patch Changes

0.4.0

Patch Changes

0.3.42

Patch Changes

0.3.41

Patch Changes

0.3.40

Patch Changes

0.3.39

Patch Changes

0.3.38

Patch Changes

0.3.37

Patch Changes

0.3.36

Patch Changes

  • Updated dependencies [95a2d10, 95a2d10]:
    • @graphql-mesh/types@0.104.26
    • @graphql-mesh/utils@0.104.34

0.3.35

Patch Changes

  • Updated dependencies [46d8eed]:
    • @graphql-mesh/utils@0.104.33

0.3.34

Patch Changes

  • Updated dependencies [94fbfbd]:
    • @graphql-mesh/string-interpolation@0.5.16
    • @graphql-mesh/utils@0.104.32

0.3.33

Patch Changes

  • Updated dependencies [339c32c]:
    • @graphql-mesh/string-interpolation@0.5.15
    • @graphql-mesh/utils@0.104.31

0.3.32

Patch Changes

  • Updated dependencies [3ad6a00]:
    • @graphql-mesh/string-interpolation@0.5.14
    • @graphql-mesh/utils@0.104.30

0.3.31

Patch Changes

  • Updated dependencies [13af2ff]:
    • @graphql-mesh/string-interpolation@0.5.13
    • @graphql-mesh/utils@0.104.29

0.3.30

Patch Changes

  • Updated dependencies [300aea0, 300aea0]:
    • @graphql-mesh/types@0.104.25
    • @graphql-mesh/utils@0.104.28

0.3.29

Patch Changes

  • Updated dependencies [2c80833, 2c80833]:
    • @graphql-mesh/types@0.104.24
    • @graphql-mesh/utils@0.104.27

0.3.28

Patch Changes

  • Updated dependencies [5d38d11]:
    • @graphql-mesh/string-interpolation@0.5.12
    • @graphql-mesh/utils@0.104.26

0.3.27

Patch Changes

  • Updated dependencies [4f81520]:
    • @graphql-mesh/types@0.104.23
    • @graphql-mesh/utils@0.104.25

0.3.26

Patch Changes

0.3.25

Patch Changes

  • #8854 080aca9 Thanks @hoi4! - gRPC Client returns undefined for empty arrays but the transport should return them as empty arrays
  • Updated dependencies [a442cbe, a442cbe, 080aca9]:
    • @graphql-mesh/types@0.104.22
    • @graphql-mesh/utils@0.104.24

0.3.24

Patch Changes

  • Updated dependencies [d213cd9, d213cd9]:
    • @graphql-mesh/types@0.104.21
    • @graphql-mesh/utils@0.104.23

0.3.23

Patch Changes

  • #9182 1474343 Thanks @ardatan! - Support characters that are invalid for GraphQL but valid for gRPC in metadata definitions.

    For example, hyphens (-) are not allowed in GraphQL field names, but they are commonly used in gRPC metadata keys. This change ensures that such characters are preserved when passing metadata from GraphQL Mesh to gRPC services.

    // mesh.config.ts
    import { defineConfig } from '@graphql-mesh/compose-cli'
    import { loadGrpcSubgraph } from '@omnigraph/grpc'
    
    export const composeConfig = defineConfig({
      subgraphs: [
        {
          sourceHandler: loadGrpcSubgraph('myService', {
            endpoint: 'localhost:50051',
            source: './service.proto',
            metaData: {
              'x-request-id': "{context.headers['x-request-id']}" // ← hyphen in key causes issue
            }
          })
        }
      ]
    })
  • Updated dependencies [6c65df7, 6c65df7, 6e3779c]:

    • @graphql-mesh/types@0.104.20
    • @graphql-mesh/utils@0.104.22

0.3.22

Patch Changes

0.3.21

Patch Changes

0.3.20

Patch Changes

  • Updated dependencies [30e8e32]:
    • @graphql-mesh/string-interpolation@0.5.10
    • @graphql-mesh/utils@0.104.19

0.3.19

Patch Changes

0.3.18

Patch Changes

0.3.17

Patch Changes

  • Updated dependencies [3987b80, 3987b80]:
    • @graphql-mesh/types@0.104.17
    • @graphql-mesh/utils@0.104.17

0.3.16

Patch Changes

  • Updated dependencies [bb42d37, bb42d37]:
    • @graphql-mesh/types@0.104.16
    • @graphql-mesh/utils@0.104.16

0.3.15

Patch Changes

  • Updated dependencies [b077f20]:
    • @graphql-mesh/types@0.104.15
    • @graphql-mesh/utils@0.104.15

0.3.14

Patch Changes

  • Updated dependencies [1db3c6b]:
    • @graphql-mesh/types@0.104.14
    • @graphql-mesh/utils@0.104.14

0.3.13

Patch Changes

0.3.12

Patch Changes

  • Updated dependencies [ffec6e7]:
    • @graphql-mesh/utils@0.104.12
    • @graphql-mesh/types@0.104.12

0.3.11

Patch Changes

  • Updated dependencies [d61faf0]:
    • @graphql-mesh/utils@0.104.11
    • @graphql-mesh/types@0.104.11

0.3.10

Patch Changes

  • Updated dependencies [7852ccd, 7852ccd]:
    • @graphql-mesh/utils@0.104.10
    • @graphql-mesh/types@0.104.10

0.3.9

Patch Changes

0.3.8

Patch Changes

  • Updated dependencies [fb6e935, fb6e935, fb6e935]:
    • @graphql-mesh/types@0.104.8
    • @graphql-mesh/utils@0.104.8

0.3.7

Patch Changes

  • Updated dependencies [c37c23b]:
    • @graphql-mesh/types@0.104.7
    • @graphql-mesh/utils@0.104.7

0.3.6

Patch Changes

  • Updated dependencies [e2666bc]:
    • @graphql-mesh/utils@0.104.6
    • @graphql-mesh/types@0.104.6

0.3.5

Patch Changes

  • Updated dependencies [9d61d75]:
    • @graphql-mesh/utils@0.104.5
    • @graphql-mesh/types@0.104.5

0.3.4

Patch Changes

  • Updated dependencies [6b4c546]:
    • @graphql-mesh/types@0.104.4
    • @graphql-mesh/utils@0.104.4

0.3.3

Patch Changes

  • Updated dependencies [0af3d0c, 0af3d0c]:
    • @graphql-mesh/utils@0.104.3
    • @graphql-mesh/types@0.104.3

0.3.2

Patch Changes

  • Updated dependencies [1b5d072]:
    • @graphql-mesh/utils@0.104.2
    • @graphql-mesh/types@0.104.2

0.3.1

Patch Changes

  • Updated dependencies [b6c083c, f416982]:
    • @graphql-mesh/utils@0.104.1
    • @graphql-mesh/types@0.104.1

0.3.0

Patch Changes

  • Updated dependencies [4528794, 4528794]:
    • @graphql-mesh/utils@0.104.0
    • @graphql-mesh/types@0.104.0

0.2.11

Patch Changes

0.2.10

Patch Changes

0.2.9

Patch Changes

  • Updated dependencies [d9cf1d3]:
    • @graphql-mesh/types@0.103.19
    • @graphql-mesh/utils@0.103.19

0.2.8

Patch Changes

  • Updated dependencies [ab0863b]:
    • @graphql-mesh/utils@0.103.18
    • @graphql-mesh/types@0.103.18

0.2.7

Patch Changes

  • Updated dependencies [eee582a]:
    • @graphql-mesh/utils@0.103.17
    • @graphql-mesh/types@0.103.17

0.2.6

Patch Changes

  • #8375 b44f8b7 Thanks @ardatan! - More clear key-value pairs in the logs

  • Updated dependencies [b44f8b7]:

    • @graphql-mesh/types@0.103.16
    • @graphql-mesh/utils@0.103.16

0.2.5

Patch Changes

  • Updated dependencies [b5c05c4]:
    • @graphql-mesh/types@0.103.15
    • @graphql-mesh/utils@0.103.15

0.2.4

Patch Changes

  • Updated dependencies [fc44a1e]:
    • @graphql-mesh/types@0.103.14
    • @graphql-mesh/utils@0.103.14

0.2.3

Patch Changes

0.2.2

Patch Changes

  • Updated dependencies [5180b06, c54e361, 78c202e]:
    • @graphql-mesh/utils@0.103.12
    • @graphql-mesh/types@0.103.12
    • @graphql-mesh/string-interpolation@0.5.8

0.2.1

Patch Changes

0.2.0

Minor Changes

  • #8203 c541164 Thanks @ardatan! - Handle multiple gRPC services correctly in a supergraph

    Previously multiple directives on Query type conflicting, which needs to be fixed on Gateway runtime later, but for now, it should be already in the transport directive. And this change fixes the issue before the gateway runtime fix.

    Generated schema will be different so this can be considered a breaking change but it will be no functional change for the existing users.

0.1.10

Patch Changes

  • Updated dependencies [b750a41]:
    • @graphql-mesh/utils@0.103.10
    • @graphql-mesh/types@0.103.10

0.1.9

Patch Changes

  • Updated dependencies [10ba2c4]:
    • @graphql-mesh/utils@0.103.9
    • @graphql-mesh/types@0.103.9

0.1.8

Patch Changes

  • Updated dependencies [93fb364]:
    • @graphql-mesh/utils@0.103.8
    • @graphql-mesh/types@0.103.8

0.1.7

Patch Changes

  • Updated dependencies []:
    • @graphql-mesh/types@0.103.7
    • @graphql-mesh/utils@0.103.7

0.1.6

Patch Changes

0.1.5

Patch Changes

  • Updated dependencies [9f9f6fe]:
    • @graphql-mesh/utils@0.103.5
    • @graphql-mesh/types@0.103.5

0.1.4

Patch Changes

  • Updated dependencies [8fcfe3f]:
    • @graphql-mesh/types@0.103.4
    • @graphql-mesh/utils@0.103.4

0.1.3

Patch Changes

  • Updated dependencies [6360755]:
    • @graphql-mesh/utils@0.103.3
    • @graphql-mesh/types@0.103.3

0.1.2

Patch Changes

  • Updated dependencies [bfd8929]:
    • @graphql-mesh/utils@0.103.2
    • @graphql-mesh/types@0.103.2

0.1.1

Patch Changes

0.1.0

Patch Changes

  • Updated dependencies [0e49907, 9873b33]:
    • @graphql-mesh/utils@0.103.0
    • @graphql-mesh/types@0.103.0

0.0.3

Patch Changes

  • Updated dependencies []:
    • @graphql-mesh/types@0.102.13
    • @graphql-mesh/utils@0.102.13

0.0.2

Patch Changes

  • Updated dependencies [eee53b9]:
    • @graphql-mesh/utils@0.102.12
    • @graphql-mesh/types@0.102.12
    • @graphql-mesh/transport-common@0.7.13

0.0.1

Patch Changes

  • Updated dependencies [de41fc2, de41fc2, de41fc2]:
    • @graphql-mesh/transport-common@0.7.12
    • @graphql-mesh/types@0.102.11
    • @graphql-mesh/utils@0.102.11