Neonatal Penguin March

    @envelop/apollo-federation
    TypeScript icon, indicating that this package has built-in type declarations

    2.6.0 • Public • Published

    @envelop/apollo-federation

    This plugin integrates Apollo Federation Gateway into Envelop.

    Getting Started

    yarn add @envelop/apollo-federation
    

    Usage Example

    import { envelop } from '@envelop/core'
    import { ApolloGateway } from '@apollo/gateway'
    import { useApolloFederation } from '@envelop/apollo-federation'
    
    // Initialize the gateway
    const gateway = new ApolloGateway({
      serviceList: [
        { name: 'accounts', url: 'http://localhost:4001' },
        { name: 'products', url: 'http://localhost:4002' }
        // ...additional subgraphs...
      ]
    })
    
    // Make sure all services are loaded
    await gateway.load()
    
    // Then pass it to the plugin configuration
    const getEnveloped = envelop({
      plugins: [
        // ... other plugins ...
        useApolloFederation({ gateway })
      ]
    })

    Keywords

    none

    Install

    npm i @envelop/apollo-federation

    DownloadsWeekly Downloads

    1,597

    Version

    2.6.0

    License

    MIT

    Unpacked Size

    12.4 kB

    Total Files

    11

    Last publish

    Collaborators

    • dotansimha