Skip to content

Commit 0efbf62

Browse files
Review of type definitions, directives and schema configuration sections (#22)
* review * update * fixing broken links * bringing back reference to the api reference page * Fix incorrect references to variables in Cypher (#17) * Remove references to deprecated directives (#11) Co-authored-by: Lidia Zuin <[email protected]> * Remove references to deprecated directives (#11) Co-authored-by: Lidia Zuin <[email protected]> * Update `@queryOptions` to `@limit` and add migration step (#19) * review * fixing broken links * Remove references to deprecated directives (#11) Co-authored-by: Lidia Zuin <[email protected]> * Remove references to deprecated directives (#11) Co-authored-by: Lidia Zuin <[email protected]> * Update `@queryOptions` to `@limit` and add migration step (#19) * fixing broken links * Remove references to deprecated directives (#11) Co-authored-by: Lidia Zuin <[email protected]> * Update `@queryOptions` to `@limit` and add migration step (#19) * fixing conflict * fixing links * final update * Restructure * Fix broken references * More broken references * Final broken references --------- Co-authored-by: Darrell Warde <[email protected]> Co-authored-by: Darrell Warde <[email protected]>
1 parent 5d9af35 commit 0efbf62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1932
-1080
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,36 @@
33
** xref:getting-started/index.adoc[]
44
*** xref:getting-started/toolbox.adoc[]
55
6+
** Type definitions
7+
*** xref:type-definitions/types/index.adoc[]
8+
**** xref:type-definitions/types/scalar.adoc[Scalar]
9+
**** xref:type-definitions/types/temporal.adoc[Temporal]
10+
**** xref:type-definitions/types/spatial.adoc[Spatial]
11+
**** xref:type-definitions/types/interfaces.adoc[Interface]
12+
**** xref:type-definitions/types/unions.adoc[Union]
13+
**** xref:type-definitions/types/relationships.adoc[]
14+
*** xref:type-definitions/directives/index.adoc[]
15+
**** xref:type-definitions/directives/basics.adoc[]
16+
**** xref:type-definitions/directives/autogeneration.adoc[]
17+
**** xref:type-definitions/directives/custom-directives.adoc[]
18+
**** xref:type-definitions/directives/cypher.adoc[]
19+
**** xref:type-definitions/directives/default-values.adoc[]
20+
**** xref:type-definitions/directives/database-mapping.adoc[]
21+
**** xref:type-definitions/directives/indexes-and-constraints.adoc[]
22+
23+
** xref:schema-configuration/index.adoc[Schema configuration]
24+
*** xref:schema-configuration/type-configuration.adoc[]
25+
*** xref:schema-configuration/global-configuration.adoc[]
26+
*** xref:schema-configuration/field-configuration.adoc[]
27+
628
** xref:queries-aggregations/index.adoc[Queries and aggregations]
729
*** xref:queries-aggregations/queries.adoc[]
830
*** xref:queries-aggregations/aggregations.adoc[]
931
*** xref:queries-aggregations/filtering.adoc[]
1032
*** xref:queries-aggregations/sorting.adoc[]
33+
*** xref:queries-aggregations/pagination/index.adoc[]
34+
**** xref:queries-aggregations/pagination/offset-based.adoc[]
35+
**** xref:queries-aggregations/pagination/cursor-based.adoc[]
1136

1237
** xref:mutations/index.adoc[]
1338
*** xref:mutations/create.adoc[]
@@ -23,10 +48,6 @@
2348

2449
** xref:custom-resolvers.adoc[]
2550

26-
** xref:pagination/index.adoc[]
27-
*** xref:pagination/offset-based.adoc[]
28-
*** xref:pagination/cursor-based.adoc[]
29-
3051
** xref:authentication-and-authorization/index.adoc[]
3152
*** xref:authentication-and-authorization/configuration.adoc[]
3253
*** xref:authentication-and-authorization/authentication.adoc[]
@@ -50,31 +71,7 @@
5071
*** xref:ogm/type-generation.adoc[]
5172
*** xref:ogm/reference.adoc[]
5273

53-
** Reference
54-
*** xref:reference/api-reference/index.adoc[]
55-
**** xref:reference/api-reference/neo4jgraphql.adoc[]
56-
**** xref:reference/api-reference/ogm.adoc[]
57-
*** xref:reference/type-definitions/index.adoc[]
58-
**** xref:reference/type-definitions/indexes-and-constraints.adoc[]
59-
**** xref:reference/type-definitions/interfaces.adoc[]
60-
**** xref:reference/type-definitions/relationships.adoc[]
61-
**** xref:reference/type-definitions/types.adoc[]
62-
**** xref:reference/type-definitions/unions.adoc[]
63-
64-
*** xref:reference/directives/index.adoc[]
65-
**** xref:reference/directives/schema-configuration/index.adoc[]
66-
***** xref:reference/directives/schema-configuration/type-configuration.adoc[]
67-
***** xref:reference/directives/schema-configuration/global-configuration.adoc[]
68-
***** xref:reference/directives/schema-configuration/field-configuration.adoc[]
69-
70-
**** xref:reference/directives/autogeneration.adoc[]
71-
**** xref:reference/directives/basics.adoc[]
72-
**** xref:reference/directives/custom-directives.adoc[]
73-
**** xref:reference/directives/cypher.adoc[]
74-
**** xref:reference/directives/default-values.adoc[]
75-
**** xref:reference/directives/database-mapping.adoc[]
76-
77-
*** xref:reference/driver-configuration.adoc[]
74+
*** xref:driver-configuration.adoc[]
7875
7976
** Frameworks and integrations
8077
*** xref:integrations/apollo-federation.adoc[]
File renamed without changes.

modules/ROOT/pages/index.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ It can generate an entire executable schema with all of the additional types nee
2323
For every query and mutation that is executed against this generated schema, the Neo4j GraphQL Library generates a single Cypher query which is executed against the database. This eliminates the https://www.google.com/search?q=graphql+n%2B1[N+1 Problem], which can make GraphQL implementations slow and inefficient.
2424

2525
- Automatic generation of xref::queries-aggregations/queries.adoc[Queries] and xref::mutations/index.adoc[Mutations] for CRUD interactions.
26-
- xref::reference/type-definitions/types.adoc[Types], including temporal and spatial.
26+
- xref::/type-definitions/types/index.adoc[Types], including temporal and spatial.
2727
- Support for both node and relationship properties.
28-
- Extensibility through the xref::reference/directives/cypher.adoc[`@cypher` directive] and/or xref::custom-resolvers.adoc[Custom Resolvers].
28+
- Extensibility through the xref::/type-definitions/directives/cypher.adoc[`@cypher` directive] and/or xref::custom-resolvers.adoc[Custom Resolvers].
2929
- Extensive xref::queries-aggregations/filtering.adoc[Filtering] and xref::queries-aggregations/sorting.adoc[Sorting] options.
30-
- Options for value xref::reference/directives/autogeneration.adoc[Autogeneration] and xref::reference/directives/default-values.adoc[Default Values].
31-
- xref::pagination/index.adoc[Pagination] options.
32-
- xref::authentication-and-authorization/index.adoc[Authentication and authorization options] and additional xref::reference/directives/schema-configuration/index.adoc[Schema Configuration].
30+
- Options for value xref::/type-definitions/directives/autogeneration.adoc[Autogeneration] and xref::/type-definitions/directives/default-values.adoc[Default Values].
31+
- xref::/queries-aggregations/pagination/index.adoc[Pagination] options.
32+
- xref::authentication-and-authorization/index.adoc[Authentication and authorization options] and additional xref::schema-configuration/index.adoc[Schema Configuration].
3333
- An xref::ogm/index.adoc[OGM] (Object Graph Mapper) for programmatic interaction with your GraphQL API.
3434
- A xref::getting-started/toolbox.adoc[Toolbox] (UI) to experiment with your Neo4j GraphQL API on Neo4j Desktop.
3535

modules/ROOT/pages/migration/index.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ type NameOfTypeToExclude @exclude {
9797
name: String
9898
}
9999
----
100-
For more information regarding the above used `@exclude` directive, see xref::reference/directives/schema-configuration/type-configuration.adoc#_exclude_deprecated[`@exclude`]
100+
For more information regarding the above used `@exclude` directive, see xref::/schema-configuration/type-configuration.adoc#_exclude_deprecated[`@exclude`]
101101

102102
=== Database Configuration
103103

@@ -153,7 +153,7 @@ server.listen().then(({ url }) => {
153153
});
154154
----
155155

156-
Database bookmarks are also supported. See xref::reference/driver-configuration.adoc[Driver Configuration] for more information.
156+
Database bookmarks are also supported. See xref::driver-configuration.adoc[Driver Configuration] for more information.
157157

158158
[[migration-guide-type-definitions]]
159159
== Type Definitions
@@ -173,7 +173,7 @@ Migrating this directive is trivial:
173173

174174
For example, `@relation(name: "ACTED_IN", direction: OUT)` becomes `@relationship(type: "ACTED_IN", direction: OUT)`.
175175

176-
See xref::reference/type-definitions/relationships.adoc[Relationships] for more information on relationships in `@neo4j/graphql`.
176+
See xref::/type-definitions/types/relationships.adoc[Relationships] for more information on relationships in `@neo4j/graphql`.
177177

178178
==== Relationship Properties
179179

@@ -226,13 +226,13 @@ And note the following changes to the two node types:
226226

227227
=== `@cypher`
228228

229-
No change. See xref::reference/directives/cypher.adoc[`@cypher` directive] for more details on this directive in `@neo4j/graphql`.
229+
No change. See xref::/type-definitions/directives/cypher.adoc[`@cypher` directive] for more details on this directive in `@neo4j/graphql`.
230230

231231
==== `@neo4j_ignore`
232232

233233
`@neo4j/graphql` offers two directives for skipping autogeneration for specified types/fields:
234234

235-
* xref::reference/directives/schema-configuration/type-configuration.adoc#_exclude_deprecated[`@exclude`]: Skip generation of specified Query/Mutation fields for an object type
235+
* xref::/schema-configuration/type-configuration.adoc#_exclude_deprecated[`@exclude`]: Skip generation of specified Query/Mutation fields for an object type
236236
* xref::custom-resolvers.adoc#custom-resolver-directive[`@customResolver`]: Ignore a field, which will need custom logic for resolution
237237

238238
==== `@isAuthenticated`, `@hasRole` and `@hasScope`
@@ -245,7 +245,7 @@ Not supported at this time.
245245

246246
==== `@id`
247247

248-
There is an equivalent directive in the new library, but it does not work using database constraints as per the old library. See xref::reference/directives/autogeneration.adoc#type-definitions-autogeneration-id[`@id`].
248+
There is an equivalent directive in the new library, but it does not work using database constraints as per the old library. See xref::/type-definitions/directives/autogeneration.adoc#type-definitions-autogeneration-id[`@id`].
249249

250250
==== `@unique`, `@index` and `@search`
251251

@@ -255,7 +255,7 @@ These all relate to database indexes and constraints, which are not currently su
255255

256256
==== Scalar Types
257257

258-
Supported as you would expect, with additional xref::reference/type-definitions/types.adoc#type-definitions-types-bigint[`BigInt`] support for 64 bit integers.
258+
Supported as you would expect, with additional xref::/type-definitions/types/scalar.adoc[`BigInt`] support for 64 bit integers.
259259

260260
==== Temporal Types (`DateTime`, `Date`)
261261

@@ -285,14 +285,14 @@ Has become:
285285

286286
Due to the move to ISO 8601 strings, input types are no longer necessary for temporal instances, so `_Neo4jDateTimeInput` has become `DateTime` and `_Neo4jDateInput` has become `Date` for input.
287287

288-
See xref::reference/type-definitions/types.adoc#type-definitions-types-temporal[Temporal Types].
288+
See xref::/type-definitions/types/temporal.adoc[Temporal Types].
289289

290290
==== Spatial Types
291291

292292
The single type in `neo4j-graphql-js`, `Point`, has been split out into two types:
293293

294-
* xref::reference/type-definitions/types.adoc#type-definitions-types-point[`Point`]
295-
* xref::reference/type-definitions/types.adoc#type-definitions-types-cartesian-point[`CartesianPoint`]
294+
* xref::/type-definitions/types/spatial.adoc#_point[`Point`]
295+
* xref::/type-definitions/types/spatial.adoc#_cartesianpoint[`CartesianPoint`]
296296

297297
Correspondingly, `_Neo4jPointInput` has also been split out into two input types:
298298

@@ -303,11 +303,11 @@ Using them in Queries and Mutations should feel remarkably similar.
303303

304304
==== Interface Types
305305

306-
Supported, queryable using inline fragments as per `neo4j-graphql-js`, but can also be created using Nested Mutations. See xref::reference/type-definitions/interfaces.adoc[Interfaces].
306+
Supported, queryable using inline fragments as per `neo4j-graphql-js`, but can also be created using Nested Mutations. See xref::/type-definitions/types/interfaces.adoc[Interfaces].
307307

308308
==== Union Types
309309

310-
Supported, queryable using inline fragments as per `neo4j-graphql-js`, but can also be created using Nested Mutations. See xref::reference/type-definitions/unions.adoc#type-definitions-unions[Unions].
310+
Supported, queryable using inline fragments as per `neo4j-graphql-js`, but can also be created using Nested Mutations. See xref::/type-definitions/types/unions.adoc#type-definitions-unions[Unions].
311311

312312
=== Fields
313313

modules/ROOT/pages/migration/v3-migration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ To improve consistency, some automatically generated plurals (e.g. `createActors
201201
your types use conventions such as `snake_case`.
202202

203203
Because of this, you may find generated queries and mutations may have different names. If you encounter this problem,
204-
please update your clients to use the new query names or use the `plural` option in the xref::reference/directives/database-mapping.adoc#type-definitions-node[@node directive]
204+
please update your clients to use the new query names or use the `plural` option in the xref::/type-definitions/directives/database-mapping.adoc#type-definitions-node[@node directive]
205205
to force a custom plural value.
206206

207207
== Custom Directives
208208
Defining and applying custom directives has changed significantly, if you are using or plan to use custom directives, make
209-
sure to check the up-to-date documentation on xref::reference/directives/custom-directives.adoc[custom directives].
209+
sure to check the up-to-date documentation on xref::/type-definitions/directives/custom-directives.adoc[custom directives].
210210

211211
== Types changes
212212
Some automatically generated types have changed to improve consistency.

modules/ROOT/pages/migration/v4-migration/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ const neoSchema = new Neo4jGraphQL({
992992
=== Opt-in Aggregation
993993

994994
Aggregation operations are no longer generated by default.
995-
They can be enabled case by case using the directives xref::reference/directives/schema-configuration/type-configuration.adoc#_query[`@query`] and xref::reference/directives/schema-configuration/field-configuration.adoc#_relationship[`@relationship`].
995+
They can be enabled case by case using the directives xref::/schema-configuration/type-configuration.adoc#_query[`@query`] and xref::/schema-configuration/field-configuration.adoc#_relationship[`@relationship`].
996996

997997
You can enable the operation fields `actorsAggregate` and `actedInAggregate` like this:
998998

modules/ROOT/pages/mutations/create.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This allows you to create not only the type in question, but to recurse down and
4242

4343
[NOTE]
4444
====
45-
The `id` field is absent from both `create` input types as the xref::reference/directives/autogeneration.adoc#type-definitions-autogeneration-id[`@id`] directive has been used.
45+
The `id` field is absent from both `create` input types as the xref::/type-definitions/directives/autogeneration.adoc#type-definitions-autogeneration-id[`@id`] directive has been used.
4646
====
4747

4848
== Single `create`

modules/ROOT/pages/mutations/update.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type Mutation {
5353

5454
[NOTE]
5555
====
56-
The `id` field cannot be updated as the xref::reference/directives/autogeneration.adoc#type-definitions-autogeneration-id[`@id`] directive has been used.
56+
The `id` field cannot be updated as the xref::/type-definitions/directives/autogeneration.adoc#type-definitions-autogeneration-id[`@id`] directive has been used.
5757
====
5858

5959
== Single `update`
@@ -412,7 +412,7 @@ mutation {
412412
== Mathematical operators
413413

414414
Mathematical operators can be used to update numerical fields based on their original values in a single DB transaction.
415-
For that, specific operators are available on different numerical types: `Int`, `Float`, xref::reference/type-definitions/types.adoc#type-definitions-types-bigint[`BigInt`].
415+
For that, specific operators are available on different numerical types: `Int`, `Float`, xref::/type-definitions/types/scalar.adoc[`BigInt`].
416416
They are supported within these entities:
417417

418418
* Nodes

modules/ROOT/pages/ogm/reference.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ const users = await User.find({ where: { name: "Jane Smith" }});
390390
|`options` +
391391
+
392392
Type: `GraphQLOptionsArg`
393-
|A JavaScript object representation of the GraphQL `options` input type used for xref::queries-aggregations/sorting.adoc[Sorting] and xref::pagination/index.adoc[Pagination].
393+
|A JavaScript object representation of the GraphQL `options` input type used for xref::queries-aggregations/sorting.adoc[Sorting] and xref::/queries-aggregations/pagination/index.adoc[Pagination].
394394

395395
|`selectionSet` +
396396
+
@@ -467,7 +467,7 @@ const { users } = await User.update({
467467
|`options` +
468468
+
469469
Type: `GraphQLOptionsArg`
470-
|A JavaScript object representation of the GraphQL `options` input type used for xref::queries-aggregations/sorting.adoc[Sorting] and xref::pagination/index.adoc[Pagination].
470+
|A JavaScript object representation of the GraphQL `options` input type used for xref::queries-aggregations/sorting.adoc[Sorting] and xref::/queries-aggregations/pagination/index.adoc[Pagination].
471471

472472
|`selectionSet` +
473473
+

modules/ROOT/pages/pagination/index.adoc

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)