The Neo4jGraphQL
class
This is the documentation of the GraphQL Library version 6. For the long-term support (LTS) version 5, refer to GraphQL Library version 5 LTS. |
You can assign different setting fields in the Neo4jGraphQL constructor:
export interface Neo4jGraphQLConstructor {
typeDefs: TypeDefinitions; (1)
resolvers?: IExecutableSchemaDefinition["resolvers"]; (2)
features?: Neo4jFeaturesSettings; (3)
driver?: Driver; (4)
debug?: boolean;
validate?: boolean;
}
1 | See Types. |
2 | See Custom resolvers. |
3 | See Feature settings on this page. |
4 | See Driver configuration. |
Feature settings
You can set different features in the features
field of the Neo4j GraphQL constructor.
The Neo4jFeaturesSettings
type looks like this:
export type Neo4jFeaturesSettings = {
filters?: Neo4jFiltersSettings;
populatedBy?: Neo4jPopulatedBySettings;
authorization?: Neo4jAuthorizationSettings;
subscriptions?: Neo4jGraphQLSubscriptionsEngine | boolean;
/** If set to `true`, removes `@neo4j/graphql` fields that are marked as deprecated to reduce schema size.
*
* NOTE: this will not remove user defined deprecated fields
**/
excludeDeprecatedFields?: {
bookmark?: boolean;
negationFilters?: boolean;
arrayFilters?: boolean;
stringAggregation?: boolean;
aggregationFilters?: boolean;
nestedUpdateOperationsFields?: boolean;
};
vector?: Neo4jVectorSettings;
};
Filter settings
Use Neo4jFiltersSettings
to enable numeric String comparisons and regular expression filters for Strings and IDs.
They are disabled by default.
See String comparison and RegEx matching.
populatedBy
settings
Use the populatedBy
field to register callback functions used by the @populatedBy
directive.
See @populatedBy
.
Authorization settings
Set authorization keys in the authorization
field.
See Security > Configuration.
Subscription settings
Enable the subscriptions
feature of the Neo4j GraphQL Library by setting it to true
.
See Subscription engines.
Exclude deprecated fields
If you are not using them, use excludeDeprecatedFields
to disable the generation of various deprecated fields.
See Exclude @deprecated
fields.
Vector settings
Set your GenAI provider credentials with the vector
field.
See @vector
.