-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump node-fetch from 2.7.0 to 3.3.2 in /_examples/federation (#2916)
* Bump node-fetch from 2.7.0 to 3.3.2 in /_examples/federation Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.7.0 to 3.3.2. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Commits](node-fetch/node-fetch@v2.7.0...v3.3.2) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Try updating require to import Signed-off-by: Steve Coffman <[email protected]> * Try updating Apollo server and gateway Signed-off-by: Steve Coffman <[email protected]> * Change import to @apollo/server Signed-off-by: Steve Coffman <[email protected]> * Change versions of everything in npm Signed-off-by: Steve Coffman <[email protected]> * Rever to node 16 Signed-off-by: Steve Coffman <[email protected]> * Switch to apollo Link Signed-off-by: Steve Coffman <[email protected]> * Use more better newer thingy Signed-off-by: Steve Coffman <[email protected]> * Change federation node version back to 16 Signed-off-by: Steve Coffman <[email protected]> * Apollo Link uses uri now instead of link Signed-off-by: Steve Coffman <[email protected]> * Change inmemory cache import Signed-off-by: Steve Coffman <[email protected]> * Remove node fetch from integration test Signed-off-by: Steve Coffman <[email protected]> * Add cross fetch Signed-off-by: Steve Coffman <[email protected]> * Adjust cross fetch to dev dependency Signed-off-by: Steve Coffman <[email protected]> * Fixup package-lock Signed-off-by: Steve Coffman <[email protected]> * Try again Signed-off-by: Steve Coffman <[email protected]> * Switch to node 18 to get fetch Signed-off-by: Steve Coffman <[email protected]> * Add type module to package.json Signed-off-by: Steve Coffman <[email protected]> * export default Signed-off-by: Steve Coffman <[email protected]> * Re-order? Signed-off-by: Steve Coffman <[email protected]> * Add external Signed-off-by: Steve Coffman <[email protected]> * add experimental vm modules to jest Signed-off-by: Steve Coffman <[email protected]> * Update git ignore for node_modules Signed-off-by: Steve Coffman <[email protected]> * Add some more jest stuff Signed-off-by: Steve Coffman <[email protected]> * refmt and regenerate Signed-off-by: Steve Coffman <[email protected]> * Add rehackt to dev dependencies Signed-off-by: Steve Coffman <[email protected]> * Change to core import Signed-off-by: Steve Coffman <[email protected]> * Aaaand do it over here too Signed-off-by: Steve Coffman <[email protected]> * Some of each Signed-off-by: Steve Coffman <[email protected]> * Move to different HTTP Link Signed-off-by: Steve Coffman <[email protected]> * Try again Signed-off-by: Steve Coffman <[email protected]> * add gql from apollo core Signed-off-by: Steve Coffman <[email protected]> * Change link to uri Signed-off-by: Steve Coffman <[email protected]> * Try just passing a string Signed-off-by: Steve Coffman <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Steve Coffman <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Steve Coffman <[email protected]> Co-authored-by: Steve Coffman <[email protected]>
- Loading branch information
1 parent
9a3694e
commit e223f1d
Showing
15 changed files
with
7,560 additions
and
781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,5 @@ | |
*.out | ||
gqlgen | ||
*.exe | ||
|
||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
const { ApolloServer } = require('apollo-server'); | ||
const { ApolloGateway } = require("@apollo/gateway"); | ||
import { ApolloServer } from '@apollo/server'; | ||
import { startStandaloneServer } from '@apollo/server/standalone'; | ||
import { ApolloGateway,IntrospectAndCompose } from '@apollo/gateway'; | ||
|
||
const gateway = new ApolloGateway({ | ||
serviceList: [ | ||
{ name: 'accounts', url: 'http://localhost:4001/query' }, | ||
{ name: 'products', url: 'http://localhost:4002/query' }, | ||
{ name: 'reviews', url: 'http://localhost:4003/query' } | ||
], | ||
supergraphSdl: new IntrospectAndCompose({ | ||
subgraphs: [ | ||
{ name: 'accounts', url: 'http://localhost:4001/query' }, | ||
{ name: 'products', url: 'http://localhost:4002/query' }, | ||
{ name: 'reviews', url: 'http://localhost:4003/query' } | ||
], | ||
}), | ||
}); | ||
|
||
const server = new ApolloServer({ | ||
gateway, | ||
|
||
subscriptions: false, | ||
}); | ||
|
||
server.listen().then(({ url }) => { | ||
console.log(`🚀 Server ready at ${url}`); | ||
}); | ||
// Note the top-level `await`! | ||
const { url } = await startStandaloneServer(server); | ||
console.log(`🚀 Server ready at ${url}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
type Review { | ||
body: String! | ||
author: User! @provides(fields: "username") | ||
product: Product! | ||
extend type EmailHost @key(fields: "id") { | ||
id: String! @external | ||
} | ||
|
||
extend type EmailHost @key(fields: "id") { | ||
extend type Manufacturer @key(fields: "id") { | ||
id: String! @external | ||
} | ||
|
||
extend type Product @key(fields: " manufacturer{ id} id") { | ||
id: String! @external | ||
manufacturer: Manufacturer! @external | ||
reviews: [Review] | ||
} | ||
|
||
extend type User @key(fields: "id") { | ||
id: ID! @external | ||
host: EmailHost! @external | ||
email: String! @external | ||
username: String! @external | ||
reviews: [Review] @requires(fields: "host {id} email") | ||
} | ||
|
||
extend type Manufacturer @key(fields: "id") { | ||
id: String! @external | ||
type Review { | ||
body: String! | ||
author: User! @provides(fields: "username") | ||
product: Product! | ||
} | ||
|
||
extend type Product @key(fields: " manufacturer{ id} id") { | ||
id: String! @external | ||
manufacturer: Manufacturer! @external | ||
reviews: [Review] | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.