On this page

@omnigraph/grpc

Changelog for @omnigraph/grpc: every release with its changes and the pull requests behind them.

0.3.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: treat missing or empty source as reflection

    Omitting source, setting it to '', or using { file: '' } now correctly falls back to gRPC server reflection instead of failing to load a proto/descriptor.

    import { defineConfig } from '@graphql-mesh/compose-cli'
    import loadGrpcSubgraph from '@omnigraph/grpc'
    
    export const composeConfig = defineConfig({
      subgraphs: [
        {
          sourceHandler: loadGrpcSubgraph('MyGrpcApi', {
            endpoint: 'localhost:50051'
            // source omitted → reflection
          })
        }
      ]
    })

    Legacy Mesh (empty file path also reflects):

    sources:
      - name: MyGrpcApi
        handler:
          grpc:
            endpoint: localhost:50051
            # source omitted or empty → reflection

0.2.28

Patch Changes

0.2.27

Patch Changes

0.2.26

Patch Changes

0.2.25

Patch Changes

0.2.24

Patch Changes

0.2.23

Patch Changes

0.2.22

Patch Changes

0.2.21

Patch Changes

0.2.20

Patch Changes

0.2.19

Patch Changes

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

0.2.18

Patch Changes

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

0.2.17

Patch Changes

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

0.2.16

Patch Changes

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

0.2.15

Patch Changes

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

0.2.14

Patch Changes

0.2.13

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
            }
          })
        }
      ]
    })

0.2.12

Patch Changes

0.2.11

Patch Changes

0.2.10

Patch Changes

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

0.2.9

Patch Changes

0.2.8

Patch Changes

0.2.7

Patch Changes

0.2.6

Patch Changes

0.2.5

Patch Changes

0.2.4

Patch Changes

0.2.3

Patch Changes

0.2.2

Patch Changes

  • #8289 c54e361 Thanks @ardatan! - dependencies updates:

  • #8289 c54e361 Thanks @ardatan! - New option selectQueryOrMutationField to decide which field belongs to which root type explicitly.

    import { defineConfig } from '@graphql-mesh/compose-cli'
    import loadGrpcSubgraph from '@omnigraph/grpc'
    
    export const composeConfig = defineConfig({
      subgraphs: [
        {
          sourceHandler: loadGrpcSubgraph('MyGrpcApi', {
            /** .. **/
    
            // Prefix to collect Query method default: list, get
            prefixQueryMethod: ['list', 'get'],
    
            // Select certain fields as Query or Mutation
            // This overrides `prefixQueryMethod`
            selectQueryOrMutationField: [
              {
                // You can use a pattern matching with *
                fieldName: '*RetrieveMovies',
                type: 'Query'
              },
              // Or you can use a specific field name
              // This will make the field GetMovie available as a Mutation
              // Because it would be Query because of `prefixQueryMethod`
              {
                fieldName: 'GetMovie',
                type: 'Mutation'
              }
            ]
          })
        }
      ]
    })
  • Updated dependencies [78c202e]:

    • @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.3

Patch Changes

  • Updated dependencies [2ef651a, 2ef651a]:
    • @graphql-mesh/cross-helpers@0.4.9
    • @graphql-mesh/string-interpolation@0.5.7

0.1.2

Patch Changes

0.1.1

Patch Changes

  • Updated dependencies []:
    • @graphql-mesh/transport-common@0.7.13

0.1.0

Minor Changes

  • #7866 0788b5d Thanks @renovate! - Use shared TransportOptions scalar in all transport directive definitions

0.0.1

Patch Changes

  • Updated dependencies [de41fc2]:
    • @graphql-mesh/transport-common@0.7.12