Skip to content

Conductor is a cutting-edge, open-source GraphQL Gateway, fully compliant with the GraphQL specification and designed to supercharge any API with powerful features and proxy flows.

License

Notifications You must be signed in to change notification settings

the-guild-org/conductor

Repository files navigation

GraphQLConf 2024 Banner: September 10-12, San Francisco. Hosted by the GraphQL Foundation

 
Conductor
 

Important

Conductor gateway is still under development, and currently available as alpha.

Please use it with caution. Feedback and Contributions are always welcome!

Conductor: MIT open-source GraphQL Gateway

GitHub Actions Workflow Status unsafe forbidden GitHub License

GraphQL Rust Cloudflare Docker

Conductor is a cutting-edge, open-source GraphQL Gateway, fully compliant with the GraphQL specification and designed to supercharge any GraphQL API with a number of powerful features and proxy flows. Crafted entirely in Rust, it offers unparalleled performance and a great developer experience, making it an ideal choice for projects requiring advanced GraphQL capabilities.

 
Conductor
 

Key Features

  • Built with Rust: Focused on performance and reliability, leveraging Rust's safety and concurrency capabilities.
  • Real open-source: Conductor is open-source (MIT) and free - and will always be.
  • GraphQL Spec Compliance: Fully adheres to the GraphQL specification, ensuring reliable and standard-compliant behavior.
  • Advanced Gateway Capabilities: Serves as a dynamic proxy between GraphQL consumers and servers, enhancing GraphQL runtime with robust plugins for caching, authentication, rate limiting, CORS, persisted queries (trusted documents), and OpenTelemetry.
  • Distributed Schemas: Seamlessly integrates with Apollo Federation, managing all aspects from query planning to response merging.
  • Extensible Endpoint Configuration: Allows exposure of multiple GraphQL endpoints from a single instance with configurable plugins per endpoint.
  • VRL (Vector Routing Language) Support: Offers limitless possibilities for custom logic, plugins, and response transformers.
  • Comprehensive Security & Monitoring: Built-in support for various authentication methods, authorization, rate limiting, and OpenTelemetry for monitoring.
  • Flexible runtime: Conductor runs either as a binary (and dockerized), and can also run on the Edge (CloudFlare Worker).

Configuration Overview

Conductor's configuration can be defined in both YAML and JSON formats. The config file contains several key sections:

  • Server: Configure the HTTP server settings, including port and host.
  • Logger: Set up logging levels for Conductor's operations.
  • Sources: Define the GraphQL sources/endpoints that Conductor will interact with. We support both monolith GraphQL and Federation sources.
  • Endpoints: Specify the GraphQL endpoints Conductor will expose, including path, source, and plugins.
  • Plugins: List global plugins that apply to all endpoints, including CORS, authentication, and more.

Configuration File Example (YAML)

server:
  port: 9000

logger:
  filter: error

sources:
  - type: graphql
    id: my-source
    config:
      endpoint: https://my-source.com/graphql

endpoints:
  - path: /graphql
    from: my-source
    plugins:
      - type: cors
        config:
          allowed_origin: "*"
      - type: graphiql

Configuration File Example (JSON)

{
  "server": {
    "port": 9000
  },
  "logger": {
    "filter": "error"
  },
  "sources": [
    {
      "type": "graphql",
      "id": "my-source",
      "config": {
        "endpoint": "https://my-source.com/graphql"
      }
    }
  ],
  "endpoints": [
    {
      "path": "/graphql",
      "from": "my-source",
      "plugins": [
        {
          "type": "cors",
          "config": {
            "allowed_origin": "*"
          }
        },
        {
          "type": "graphiql"
        }
      ]
    }
  ]
}

Running Conductor

Conductor can be ran via the docker image, and it can even be ran via npx for quick and convenient usage. It also fully supports running as a WASM on Cloudflare Workers, providing flexibility in deployment options.

npx @graphql-conductor/bin ./conductor.config.yaml

Or, locally:

cargo run --bin conductor ./conductor.config.json

If config is not provided as the first argument, Conductor will try to read config.json from the root by default. For more details on setting up and running Conductor, refer to our documentation.

Contributions

Contributions, issues and feature requests are very welcome. If you are using this package and fixed a bug for yourself, please consider submitting a PR!

And if this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.

Code of Conduct

Help us keep Conductor open and inclusive. Please read and follow our Code of Conduct as adopted from Contributor Covenant

License

GitHub license

Conductor is open-source software licensed under MIT.