From 296f27821afeb1aa4f85166e5566dbd144c64327 Mon Sep 17 00:00:00 2001 From: Richard Sill Date: Fri, 15 Mar 2024 19:03:36 +0100 Subject: [PATCH 1/4] added some missing aliases --- modules/ROOT/pages/getting-started/index.adoc | 1 + modules/ROOT/pages/ogm/index.adoc | 1 + modules/ROOT/pages/ogm/reference.adoc | 3 ++- modules/ROOT/pages/type-definitions/directives/cypher.adoc | 1 + modules/ROOT/pages/type-definitions/directives/index.adoc | 1 + modules/ROOT/pages/type-definitions/types/index.adoc | 2 ++ 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/getting-started/index.adoc b/modules/ROOT/pages/getting-started/index.adoc index 6bac6662..ba5477b9 100644 --- a/modules/ROOT/pages/getting-started/index.adoc +++ b/modules/ROOT/pages/getting-started/index.adoc @@ -1,5 +1,6 @@ [[getting-started]] = Getting started +:page-aliases: getting-started.adoc :description: This section describes how to get started with the Neo4j GraphQL Library. diff --git a/modules/ROOT/pages/ogm/index.adoc b/modules/ROOT/pages/ogm/index.adoc index 5b5a822d..274ddae0 100644 --- a/modules/ROOT/pages/ogm/index.adoc +++ b/modules/ROOT/pages/ogm/index.adoc @@ -1,5 +1,6 @@ [[ogm]] :description: This section describes how to use the OGM functionality in Neo4j GraphQL. +:page-aliases: ogm/examples.adoc = OGM Most applications don't only expose a single GraphQL API -- there may also be scheduled jobs, authentication, and migrations keeping an application on. diff --git a/modules/ROOT/pages/ogm/reference.adoc b/modules/ROOT/pages/ogm/reference.adoc index 4c0df3ea..63b70114 100644 --- a/modules/ROOT/pages/ogm/reference.adoc +++ b/modules/ROOT/pages/ogm/reference.adoc @@ -4,7 +4,8 @@ :page-aliases: ogm/api-reference/model/aggregate.adoc, ogm/api-reference/model/create.adoc, \ ogm/api-reference/model/find.adoc, ogm/api-reference/model/delete.adoc, \ ogm/api-reference/model/update.adoc, ogm/api-reference/model/index.adoc, \ -ogm/api-reference/index.adoc, ogm/api-reference/ogm.adoc, ogm/api-reference/type-generation.adoc +ogm/api-reference/index.adoc, ogm/api-reference/ogm.adoc, ogm/api-reference/type-generation.adoc, \ +omg/examples/rest-api.adoc The following sections work as a reference guide to all functionalities in OGM and in the Model class. diff --git a/modules/ROOT/pages/type-definitions/directives/cypher.adoc b/modules/ROOT/pages/type-definitions/directives/cypher.adoc index 67cafe7a..be576e30 100644 --- a/modules/ROOT/pages/type-definitions/directives/cypher.adoc +++ b/modules/ROOT/pages/type-definitions/directives/cypher.adoc @@ -1,6 +1,7 @@ [[type-definitions-cypher]] :description: This page describes how to use the @cypher directive in the Neo4j GraphQL Library. = `@cypher` +:page-aliases: type-definitions/cypher.adoc The `@cypher` directive binds a GraphQL field to the results of a Cypher query. This directive can be used both for properties in a type or as top level queries. diff --git a/modules/ROOT/pages/type-definitions/directives/index.adoc b/modules/ROOT/pages/type-definitions/directives/index.adoc index 3436b145..775e33db 100644 --- a/modules/ROOT/pages/type-definitions/directives/index.adoc +++ b/modules/ROOT/pages/type-definitions/directives/index.adoc @@ -1,6 +1,7 @@ [[directives]] :description: This page lists all directives available in the Neo4j GraphQL Library. = Directives +:page-aliases: directives.adoc The Neo4j GraphQL Library provides the following directives to be used whilst defining types: diff --git a/modules/ROOT/pages/type-definitions/types/index.adoc b/modules/ROOT/pages/type-definitions/types/index.adoc index b674d16f..10a381c3 100644 --- a/modules/ROOT/pages/type-definitions/types/index.adoc +++ b/modules/ROOT/pages/type-definitions/types/index.adoc @@ -1,6 +1,8 @@ [[types]] :description: This page lists all types available in the Neo4j GraphQL Library. + = Types +:page-aliases: type-definitions/types.adoc The Neo4j GraphQL Library provides the following types: From b9a43512f3ba78211d507c926e3e0ca4d10fbb2d Mon Sep 17 00:00:00 2001 From: Richard Sill Date: Mon, 18 Mar 2024 14:24:30 +0100 Subject: [PATCH 2/4] fixed more alias issues and removed three pages which no longer show up in the docs --- .../index.adoc | 2 +- modules/ROOT/pages/migration/index.adoc | 5 +- modules/ROOT/pages/ogm/index.adoc | 1 - modules/ROOT/pages/ogm/installation.adoc | 1 + modules/ROOT/pages/ogm/reference.adoc | 3 +- .../pages/queries-aggregations/queries.adoc | 1 - .../pages/reference/api-reference/index.adoc | 6 - .../reference/api-reference/neo4jgraphql.adoc | 274 ------------------ .../pages/reference/api-reference/ogm.adoc | 5 - modules/ROOT/pages/troubleshooting.adoc | 3 +- .../type-definitions/directives/cypher.adoc | 2 +- 11 files changed, 10 insertions(+), 293 deletions(-) delete mode 100644 modules/ROOT/pages/reference/api-reference/index.adoc delete mode 100644 modules/ROOT/pages/reference/api-reference/neo4jgraphql.adoc delete mode 100644 modules/ROOT/pages/reference/api-reference/ogm.adoc diff --git a/modules/ROOT/pages/authentication-and-authorization/index.adoc b/modules/ROOT/pages/authentication-and-authorization/index.adoc index f64b8450..9ed22e5e 100644 --- a/modules/ROOT/pages/authentication-and-authorization/index.adoc +++ b/modules/ROOT/pages/authentication-and-authorization/index.adoc @@ -3,7 +3,7 @@ :page-aliases: auth/index.adoc, auth/setup.adoc, auth/authentication.adoc, \ auth/authorization.adoc, auth/auth-directive.adoc, auth/subscriptions.adoc, \ auth/authorization/allow.adoc, auth/authorization/bind.adoc, auth/authorization/roles.adoc, \ -auth/authorization/where.adoc, guides/v4-migration/authorization.adoc +auth/authorization/where.adoc * xref::authentication-and-authorization/authentication.adoc[Authentication] - Explicit authentication, configured using the `@authentication` directive. diff --git a/modules/ROOT/pages/migration/index.adoc b/modules/ROOT/pages/migration/index.adoc index c07d75ca..6c3ef1b9 100644 --- a/modules/ROOT/pages/migration/index.adoc +++ b/modules/ROOT/pages/migration/index.adoc @@ -1,6 +1,9 @@ [[v5-migration]] :description: This page lists the breaking changes from version 4.0.0 to 5.0.0 and describes how to update. -:page-aliases: guides/index.adoc, guides/migration-guide/index.adoc, guides/migration-guide/server.adoc, guides/migration-guide/type-definitions.adoc, guides/migration-guide/mutations.adoc +:page-aliases: guides/index.adoc, guides/migration-guide/index.adoc, guides/migration-guide/server.adoc, \ +guides/migration-guide/queries.adoc, guides/migration-guide/type-definitions.adoc, guides/migration-guide/mutations.adoc + +:page-aliases: = Migration to 5.0.0 This page lists all breaking changes from the Neo4j GraphQL Library version 4.x to 5.x and how to update it. diff --git a/modules/ROOT/pages/ogm/index.adoc b/modules/ROOT/pages/ogm/index.adoc index 274ddae0..5b5a822d 100644 --- a/modules/ROOT/pages/ogm/index.adoc +++ b/modules/ROOT/pages/ogm/index.adoc @@ -1,6 +1,5 @@ [[ogm]] :description: This section describes how to use the OGM functionality in Neo4j GraphQL. -:page-aliases: ogm/examples.adoc = OGM Most applications don't only expose a single GraphQL API -- there may also be scheduled jobs, authentication, and migrations keeping an application on. diff --git a/modules/ROOT/pages/ogm/installation.adoc b/modules/ROOT/pages/ogm/installation.adoc index c4cd6989..b5c272f8 100644 --- a/modules/ROOT/pages/ogm/installation.adoc +++ b/modules/ROOT/pages/ogm/installation.adoc @@ -1,6 +1,7 @@ [[ogm-installation]] :description: This page describes how to install the OGM in Neo4j GraphQL and includes examples of how to use it. = Installation +:page-aliases: ogm/examples/index.adoc, omg/examples/rest-api.adoc, omg/examples/custom-resolvers.adoc The OGM can be installed into a new or existing Node.js project in a similar way to the installation of the Neo4j GraphQL Library. As such, it requires some dependencies to be included: diff --git a/modules/ROOT/pages/ogm/reference.adoc b/modules/ROOT/pages/ogm/reference.adoc index 63b70114..4c0df3ea 100644 --- a/modules/ROOT/pages/ogm/reference.adoc +++ b/modules/ROOT/pages/ogm/reference.adoc @@ -4,8 +4,7 @@ :page-aliases: ogm/api-reference/model/aggregate.adoc, ogm/api-reference/model/create.adoc, \ ogm/api-reference/model/find.adoc, ogm/api-reference/model/delete.adoc, \ ogm/api-reference/model/update.adoc, ogm/api-reference/model/index.adoc, \ -ogm/api-reference/index.adoc, ogm/api-reference/ogm.adoc, ogm/api-reference/type-generation.adoc, \ -omg/examples/rest-api.adoc +ogm/api-reference/index.adoc, ogm/api-reference/ogm.adoc, ogm/api-reference/type-generation.adoc The following sections work as a reference guide to all functionalities in OGM and in the Model class. diff --git a/modules/ROOT/pages/queries-aggregations/queries.adoc b/modules/ROOT/pages/queries-aggregations/queries.adoc index 35fc6ccd..360feede 100644 --- a/modules/ROOT/pages/queries-aggregations/queries.adoc +++ b/modules/ROOT/pages/queries-aggregations/queries.adoc @@ -1,6 +1,5 @@ [[queries]] = Queries -:page-aliases: guides/migration-guide/queries.adoc :description: This page describes how to read or fetch values in the Neo4j GraphQL Library. diff --git a/modules/ROOT/pages/reference/api-reference/index.adoc b/modules/ROOT/pages/reference/api-reference/index.adoc deleted file mode 100644 index 67c79342..00000000 --- a/modules/ROOT/pages/reference/api-reference/index.adoc +++ /dev/null @@ -1,6 +0,0 @@ -[[api-reference]] -= API Reference -:page-aliases: api-reference/index.adoc - -- xref::reference/api-reference/neo4jgraphql.adoc[`Neo4jGraphQL`] -- xref::reference/api-reference/ogm.adoc[`@neo4j/graphql-ogm`] \ No newline at end of file diff --git a/modules/ROOT/pages/reference/api-reference/neo4jgraphql.adoc b/modules/ROOT/pages/reference/api-reference/neo4jgraphql.adoc deleted file mode 100644 index ac5692ab..00000000 --- a/modules/ROOT/pages/reference/api-reference/neo4jgraphql.adoc +++ /dev/null @@ -1,274 +0,0 @@ -[[api-reference-neo4jgraphql]] -= `Neo4jGraphQL` -:page-aliases: api-reference/neo4jgraphql.adoc - -== `constructor` - -Returns a `Neo4jGraphQL` instance. - -Takes an `input` object as a parameter, the supported fields of which are described below. - -=== Example - -[source, javascript, indent=0] ----- -const neoSchema = new Neo4jGraphQL({ - typeDefs, -}); ----- - -[[api-reference-neo4jgraphql-input]] -=== Input - -Accepts all of the options from https://www.graphql-tools.com/docs/generate-schema#makeexecutableschemaoptions[`makeExecutableSchema`], plus the additional arguments below: - -|=== -|Name and Type |Description - -|`driver` + - + - Type: https://neo4j.com/docs/javascript-manual/current/[`Driver`] -|An instance of a Neo4j driver. - -|`features` + - + - Type: xref::reference/api-reference/neo4jgraphql.adoc#api-reference-neo4jgraphql-input-neo4jfeaturessettings[`Neo4jFeaturesSettings`] -|Could be used for configure/enable/disable specific features. -|=== - -[[api-reference-neo4jgraphql-input-neo4jfeaturessettings]] -==== `Neo4jFeaturesSettings` - -|=== -|Name and Type |Description - -|`filters` + - + - Type: xref::reference/api-reference/neo4jgraphql.adoc#api-reference-neo4jgraphql-input-neo4jfilterssettings[`Neo4jFiltersSettings`] -|Additional configuration for filters. -|=== - -[[api-reference-neo4jgraphql-input-neo4jfilterssettings]] -==== `Neo4jFiltersSettings` - -|=== -|Name and Type |Description - -|`String` + - + - Type: xref::reference/api-reference/neo4jgraphql.adoc#api-reference-neo4jgraphql-input-neo4jstringfilterssettings[`Neo4jStringFiltersSettings`] -|Additional configuration for String filters. -|`ID` + - + - Type: xref::reference/api-reference/neo4jgraphql.adoc#api-reference-neo4jgraphql-input-neo4jidfilterssettings[`Neo4jIDFiltersSettings`] -|Additional configuration for String filters. -|=== - -[[api-reference-neo4jgraphql-input-neo4jstringfilterssettings]] -==== `Neo4jStringFiltersSettings` - -|=== -|Name and Type |Description - -|`GT` + - + - Type: `boolean` -| Enables GT comparator. - -|`GTE` + - + - Type: `boolean` -| Enables GTE comparator. - -|`LT` + - + - Type: `boolean` -| Enables LT comparator. - -|`LTE` + - + - Type: `boolean` -| Enables LTE comparator. - -|`MATCHES` + - + - Type: `boolean` -| Enables MATCHES comparator. - -|=== - -[[api-reference-neo4jgraphql-input-neo4jidfilterssettings]] -==== `Neo4jIDFiltersSettings` - -|=== -|Name and Type |Description - -|`MATCHES` + - + - Type: `boolean` -| Enables MATCHES comparator. - -|=== - -[[api-reference-neo4jgraphql-input-neo4jgraphqlplugins]] -==== `Neo4jGraphQLPlugins` - -|=== -|Name and Type |Description - -|`auth` + - + - Type: `Neo4jGraphQLAuthPlugin` -|Plugin slot for auth capabilities. -|=== - -[[api-reference-getschema]] -== `getSchema` - -An asynchronous method that generates the GraphQL schema to be used in a server. The result is memoized, so if this is called twice, the schema is only generated once. - -[[api-reference-checkneo4jcompat]] -== `checkNeo4jCompat` - -Asynchronous method to check the compatibility of the specified DBMS, that either resolves to `void` in a successful scenario, or throws an error if the database is not compatible with the Neo4j GraphQL Library. - -Takes an `input` object as a parameter, the supported fields of which are described below. - -=== Example - -Given any valid type definitions saved to the variable `typeDefs` and a valid driver instance saved to the variable `driver`, the following will confirm database compatibility: - -[source, javascript, indent=0] ----- -const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); -await neoSchema.checkNeo4jCompat(); ----- - -[[api-reference-checkneo4jcompat-input]] -=== Input - -Accepts the arguments below: - -|=== -|Name and Type |Description - -|`driver` + - + - Type: https://neo4j.com/docs/javascript-manual/current/[`Driver`] -|An instance of a Neo4j driver. - -|`driverConfig` + - + - Type: xref::reference/api-reference/neo4jgraphql.adoc#api-reference-checkneo4jcompat-input-driverconfig[`DriverConfig`] -|Additional driver configuration options. -|=== - -[[api-reference-checkneo4jcompat-input-driverconfig]] -==== `DriverConfig` - -|=== -|Name and Type |Description - -|`database` + - + - Type: `string` -|The name of the database within the DBMS to connect to. - -|`bookmarks` + - + - Type: `string` or `Array` -|One or more bookmarks to use for the connection. -|=== - -[[api-reference-assertconstraints]] -== `assertIndexesAndConstraints` - -Asynchronous method to assert the existence of database constraints, that either resolves to `void` in a successful scenario, or throws an error if the necessary constraints do not exist following its execution. - -Takes an `input` object as a parameter, the supported fields of which are described below. - -=== Example - -Given the following type definitions saved to the variable `typeDefs` and a valid driver instance saved to the variable `driver`: - -[source, graphql, indent=0] ----- -type Book { - isbn: String! @unique -} ----- - -And the construction of a `Neo4jGraphQL`, using: - -[source, javascript, indent=0] ----- -const neoSchema = new Neo4jGraphQL({ typeDefs, driver }); -const schema = await neoSchema.getSchema(); ----- - -The following will check whether a unique node property constraint exists for label "Book" and property "isbn", and throw an error if it does not: - -[source, javascript, indent=0] ----- -await neoSchema.assertIndexesAndConstraints(); ----- - -The next example will create the constraint if it does not exist: - -[source, javascript, indent=0] ----- -await neoSchema.assertIndexesAndConstraints({ options: { create: true } }); ----- - -[[api-reference-assertconstraints-input]] -=== Input - -Accepts the arguments below: - -|=== -|Name and Type |Description - -|`driver` + - + - Type: https://neo4j.com/docs/javascript-manual/current/[`Driver`] -|An instance of a Neo4j driver. - -|`driverConfig` + - + - Type: xref::reference/api-reference/neo4jgraphql.adoc#api-reference-assertconstraints-input-driverconfig[`DriverConfig`] -|Additional driver configuration options. - -|`options` + - + - Type: xref::reference/api-reference/neo4jgraphql.adoc#api-reference-assertconstraints-input-assertconstraintsoptions[`AssertConstraintsOptions`] -|Options for the execution of `assertIndexesAndConstraints`. -|=== - -[[api-reference-assertconstraints-input-driverconfig]] -==== `DriverConfig` - -|=== -|Name and Type |Description - -|`database` + - + - Type: `string` -|The name of the database within the DBMS to connect to. - -|`bookmarks` + - + - Type: `string` or `Array` -|One or more bookmarks to use for the connection. -|=== - -[[api-reference-assertconstraints-input-assertconstraintsoptions]] -==== `AssertConstraintsOptions` - -|=== -|Name and Type |Description - -|`create` + - + - Type: `boolean` -|Whether or not to create constraints if they do not yet exist. Disabled by default. -|=== \ No newline at end of file diff --git a/modules/ROOT/pages/reference/api-reference/ogm.adoc b/modules/ROOT/pages/reference/api-reference/ogm.adoc deleted file mode 100644 index aa63cec2..00000000 --- a/modules/ROOT/pages/reference/api-reference/ogm.adoc +++ /dev/null @@ -1,5 +0,0 @@ -[[api-reference-ogm]] -= `@neo4j/graphql-ogm` -:page-aliases: api-reference/ogm.adoc - -See xref::ogm/reference.adoc[`OGM`]. \ No newline at end of file diff --git a/modules/ROOT/pages/troubleshooting.adoc b/modules/ROOT/pages/troubleshooting.adoc index 17289464..f998c4ee 100644 --- a/modules/ROOT/pages/troubleshooting.adoc +++ b/modules/ROOT/pages/troubleshooting.adoc @@ -1,6 +1,7 @@ [[troubleshooting]] = Troubleshooting -:page-aliases: troubleshooting/faqs.adoc, troubleshooting/security.adoc, troubleshooting/optimizing-create-operations.adoc, appendix/preventing-overfetching.adoc, appendix.adoc +:page-aliases: troubleshooting/index.adoc, troubleshooting/faqs.adoc, troubleshooting/security.adoc, \ +troubleshooting/optimizing-create-operations.adoc, appendix/preventing-overfetching.adoc, appendix/index.adoc This chapter contains common troubleshooting steps. Additionally, there is a section for xref::troubleshooting.adoc#troubleshooting-faqs[FAQs] (Frequently Asked Questions) where you might find answers to your problems. diff --git a/modules/ROOT/pages/type-definitions/directives/cypher.adoc b/modules/ROOT/pages/type-definitions/directives/cypher.adoc index be576e30..3001d36e 100644 --- a/modules/ROOT/pages/type-definitions/directives/cypher.adoc +++ b/modules/ROOT/pages/type-definitions/directives/cypher.adoc @@ -1,6 +1,6 @@ [[type-definitions-cypher]] :description: This page describes how to use the @cypher directive in the Neo4j GraphQL Library. -= `@cypher` += `@cypher` :page-aliases: type-definitions/cypher.adoc The `@cypher` directive binds a GraphQL field to the results of a Cypher query. From b5aaba1177c12e5e19a53b59b890b17d20d930ec Mon Sep 17 00:00:00 2001 From: Richard Sill <156673635+rsill-neo4j@users.noreply.github.com> Date: Tue, 19 Mar 2024 08:17:25 +0100 Subject: [PATCH 3/4] Update modules/ROOT/pages/migration/index.adoc Co-authored-by: Lidia Zuin <102308961+lidiazuin@users.noreply.github.com> --- modules/ROOT/pages/migration/index.adoc | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/ROOT/pages/migration/index.adoc b/modules/ROOT/pages/migration/index.adoc index 6c3ef1b9..c44176ec 100644 --- a/modules/ROOT/pages/migration/index.adoc +++ b/modules/ROOT/pages/migration/index.adoc @@ -3,7 +3,6 @@ :page-aliases: guides/index.adoc, guides/migration-guide/index.adoc, guides/migration-guide/server.adoc, \ guides/migration-guide/queries.adoc, guides/migration-guide/type-definitions.adoc, guides/migration-guide/mutations.adoc -:page-aliases: = Migration to 5.0.0 This page lists all breaking changes from the Neo4j GraphQL Library version 4.x to 5.x and how to update it. From df64263907f203cd133915a73648f4ed91d8b7f2 Mon Sep 17 00:00:00 2001 From: Richard Sill Date: Tue, 19 Mar 2024 09:17:47 +0100 Subject: [PATCH 4/4] review suggestion --- modules/ROOT/pages/ogm/installation.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/ogm/installation.adoc b/modules/ROOT/pages/ogm/installation.adoc index b5c272f8..557e28e2 100644 --- a/modules/ROOT/pages/ogm/installation.adoc +++ b/modules/ROOT/pages/ogm/installation.adoc @@ -1,7 +1,7 @@ [[ogm-installation]] :description: This page describes how to install the OGM in Neo4j GraphQL and includes examples of how to use it. = Installation -:page-aliases: ogm/examples/index.adoc, omg/examples/rest-api.adoc, omg/examples/custom-resolvers.adoc +:page-aliases: ogm/examples/index.adoc The OGM can be installed into a new or existing Node.js project in a similar way to the installation of the Neo4j GraphQL Library. As such, it requires some dependencies to be included: