You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/graphql/sharing-models.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@
4
4
5
5
One of the biggest advantages of using Typescript for the backend of your project is the ability to reuse the same models in a Typescript-based frontend application, by using a common Typescript package.
6
6
7
-
but there's a problem: the models created using the Code first approach are heavily decorated with graphql related decorators. Those decorators are irrelevant in the frontend, negatively impacting performance.
7
+
But there's a problem: the models created using the code first approach are heavily decorated with GraphQL related decorators. Those decorators are irrelevant in the frontend, negatively impacting performance.
8
8
9
9
#### Using the model shim
10
10
11
-
To solve this issue, nest provides a "shim" which allows you to replace the original decorators with inert code by using a `webpack` (or similar) configuration.
11
+
To solve this issue, NestJS provides a "shim" which allows you to replace the original decorators with inert code by using a `webpack` (or similar) configuration.
12
12
To use this shim, configure an alias between the `@nestjs/graphql` package and the shim.
13
13
14
14
For example, for webpack this is resolved this way:
0 commit comments