-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nestjs): update to NestJS v9/10 and Federation v2
- Loading branch information
1 parent
d28a95c
commit 3fc0038
Showing
109 changed files
with
4,698 additions
and
10,814 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"trailingComma": "all" | ||
"trailingComma": "all", | ||
"bracketSameLine": false, | ||
"bracketSpacing": true, | ||
"semi": true | ||
} |
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,15 +1,18 @@ | ||
import { ApolloDriver, ApolloDriverConfig } from "@nestjs/apollo"; | ||
import { Module } from "@nestjs/common"; | ||
import { TypeGraphQLModule } from "../../src"; | ||
|
||
import RecipeModule from "./recipe/module"; | ||
|
||
@Module({ | ||
imports: [ | ||
// TypeGraphQLModule.forRoot<ApolloDriverConfig>({ | ||
TypeGraphQLModule.forRoot({ | ||
driver: ApolloDriver, | ||
emitSchemaFile: true, | ||
validate: false, | ||
}), | ||
RecipeModule, | ||
], | ||
}) | ||
export default class AppModule {} | ||
export default class AppModule { } |
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 |
---|---|---|
|
@@ -19,4 +19,4 @@ type Recipe { | |
input RecipeInput { | ||
description: String | ||
title: String! | ||
} | ||
} |
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 |
---|---|---|
|
@@ -25,4 +25,4 @@ type SuperRecipe { | |
description: String | ||
isSuperRecipe: Boolean! | ||
title: String! | ||
} | ||
} |
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 |
---|---|---|
|
@@ -25,4 +25,4 @@ type SuperAnimal { | |
isSuperHero: Boolean! | ||
name: String! | ||
weight: Int! | ||
} | ||
} |
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 |
---|---|---|
|
@@ -23,4 +23,4 @@ type Recipe { | |
input RecipeInput { | ||
description: String | ||
title: String! | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
10 changes: 5 additions & 5 deletions
10
examples/5-middlewares/index.ts → examples/4-middlewares/index.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -19,4 +19,4 @@ type Recipe { | |
input RecipeInput { | ||
description: String | ||
title: String! | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Apollo Federation | ||
|
||
Showcase of Apollo Federation approach, using the `ApolloGatewayDriver`. | ||
|
||
### How to run? | ||
|
||
This example is a bit more complex than the other ones. | ||
|
||
Apart from running the main `index.ts` file by e.g. `npx ts-node ./examples/6-federation-2/index.ts`, you also need to run all the other services first: | ||
|
||
- `npx ts-node ./examples/6-federation-2/accounts/index.ts` | ||
- `npx ts-node ./examples/6-federation-2/inventory/index.ts` | ||
- `npx ts-node ./examples/6-federation-2/products/index.ts` | ||
- `npx ts-node ./examples/6-federation-2/reviews/index.ts` | ||
|
||
They will be listening on ports 3001-3004 and the main script on port 3000. |
Oops, something went wrong.