Giter VIP home page Giter VIP logo

the-guild-org / conductor Goto Github PK

View Code? Open in Web Editor NEW
83.0 11.0 2.0 4.32 MB

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.

Home Page: https://the-guild.dev/graphql/gateway

License: MIT License

Rust 79.78% JavaScript 2.09% Dockerfile 0.19% HCL 0.26% TypeScript 16.06% MDX 1.52% Shell 0.10%
federation fusion gateway graphql proxy rust

conductor's Introduction

 
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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.