Skip to content

Commit f1c9892

Browse files
authored
Merge pull request #145 from neo4j/optimization-page
Add optimization page
2 parents 40fb4ee + bcfc950 commit f1c9892

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,5 @@
8383
8484
* xref:migration/index.adoc[Migration guide]
8585
* xref:deprecations.adoc[Deprecations]
86+
* xref:optimization.adoc[]
8687
* xref:troubleshooting.adoc[]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[[optimization]]
2+
= Optimization
3+
4+
5+
This page contains optimizations to improve the performance of a production system using `@neo4j/graphql`.
6+
7+
== Schema optimizations
8+
This section covers optimizations to reduce the size of the generated schema. Reducing the schema size has the following performance benefits:
9+
10+
* Reduce server startup time.
11+
* Reduce memory footprint.
12+
13+
=== Exclude `@deprecated` fields
14+
The `@neo4j/graphql` library generates some GraphQL fields and operations marked as `@deprecated`. These exists to keep compatibility with previous versions of the library.
15+
16+
If you are not using these deprecated fields, you can disable their generation with the `excludeDeprecatedFields` flag in the library setup.
17+
18+
The following example disables all deprecated fields that are generated in the library:
19+
20+
```js
21+
const neoSchema = new Neo4jGraphQL({
22+
typeDefs,
23+
driver,
24+
features: {
25+
excludeDeprecatedFields: {
26+
bookmark: true,
27+
negationFilters: true,
28+
arrayFilters: true,
29+
stringAggregation: true,
30+
aggregationFilters: true,
31+
},
32+
},
33+
});
34+
```
35+

0 commit comments

Comments
 (0)