Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@

* xref:migration/index.adoc[Migration guide]
* xref:deprecations.adoc[Deprecations]
* xref:optimization.adoc[]
* xref:troubleshooting.adoc[]
35 changes: 35 additions & 0 deletions modules/ROOT/pages/optimization.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[[optimization]]
= Optimization


This page contains optimizations to improve the performance of a production system using `@neo4j/graphql`.

== Schema optimizations
This section covers optimizations to reduce the size of the generated schema. Reducing the schema size has the following performance benefits:

* Reduce server startup time.
* Reduce memory footprint.

=== Exclude `@deprecated` fields
The `@neo4j/graphql` library generates some GraphQL fields and operations marked as `@deprecated`. These exists to keep compatibility with previous versions of the library.

If you are not using these deprecated fields, you can disable their generation with the `excludeDeprecatedFields` flag in the library setup.

The following example disables all deprecated fields that are generated in the library:

```js
const neoSchema = new Neo4jGraphQL({
typeDefs,
driver,
features: {
excludeDeprecatedFields: {
bookmark: true,
negationFilters: true,
arrayFilters: true,
stringAggregation: true,
aggregationFilters: true,
},
},
});
```