0.5.0 • Published 9 months ago

@graphql-yoga/apollo-managed-federation v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@graphql-yoga/apollo-managed-federation

This plugin integrates Apollo Managed Federation into Yoga.

Installation

First install required dependencies:

yarn add graphql-yoga @graphql-yoga/apollo-managed-federation

You will also need and API key and the graph ref you want to deploy.

Please follow this instructions if you don't know where to find this values.

Usage Example

import { createServer } from 'node:http'
import { createYoga } from 'graphql-yoga'
import { useManagedFederation } from '@graphql-yoga/apollo-managed-federation'

const yoga = createYoga({
  plugins: [useManagedFederation()]
})

const server = createServer(yoga)

server.listen(4000, () => {
  console.log('Server is running on http://localhost:4000')
})

process.on('SIGINT', () => {
  server.close()
})

You can then start the gateway, don't forget to provide your API key and graph ref. You can also provide this values programmatically in plugin options.

APOLLO_KEY='<YOUR_GRAPH_API_KEY>' APOLLO_GRAPH_REF='<YOUR_GRAPH_ID>@<VARIANT>' node index.mjs
0.5.0

9 months ago

0.4.0

11 months ago

0.3.3

12 months ago

0.3.2

12 months ago

0.3.1

12 months ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago