@envelop/apollo-federation 2.4.0-alpha-731c100.0 → 2.4.0-alpha-22f3089.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ ## `@envelop/apollo-federation`
2
+
3
+ This plugin integrates Apollo Federation Gateway into Envelop.
4
+
5
+ ## Getting Started
6
+
7
+ ```
8
+ yarn add @envelop/apollo-federation
9
+ ```
10
+
11
+ ## Usage Example
12
+
13
+ ```ts
14
+ import { envelop } from '@envelop/core';
15
+ import { ApolloGateway } from '@apollo/gateway';
16
+ import { useApolloFederation } from '@envelop/apollo-federation';
17
+
18
+ // Initialize the gateway
19
+ const gateway = new ApolloGateway({
20
+ serviceList: [
21
+ { name: 'accounts', url: 'http://localhost:4001' },
22
+ { name: 'products', url: 'http://localhost:4002' },
23
+ // ...additional subgraphs...
24
+ ],
25
+ });
26
+
27
+ // Make sure all services are loaded
28
+ await gateway.load();
29
+
30
+ // Then pass it to the plugin configuration
31
+ const getEnveloped = envelop({
32
+ plugins: [
33
+ // ... other plugins ...
34
+ useApolloFederation({ gateway }),
35
+ ],
36
+ });
37
+ ```
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@envelop/apollo-federation",
3
- "version": "2.4.0-alpha-731c100.0",
3
+ "version": "2.4.0-alpha-22f3089.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@envelop/core": "2.4.0-alpha-731c100.0",
6
+ "@envelop/core": "2.4.0-alpha-22f3089.0",
7
7
  "@apollo/gateway": "^0.41.0 || ^0.42.0 || ^0.43.0",
8
8
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
9
9
  },