Skip to content

Commit 20190c0

Browse files
committed
got rid of 'type-definitions' in the directory structure
1 parent 6625738 commit 20190c0

36 files changed

+248
-350
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@
77
88
* *Reference*
99
10-
* xref:type-definitions/types/index.adoc[]
11-
** xref:type-definitions/types/scalar.adoc[Scalar]
12-
** xref:type-definitions/types/temporal.adoc[Temporal]
13-
** xref:type-definitions/types/spatial.adoc[Spatial]
14-
** xref:type-definitions/types/interfaces.adoc[Interfaces]
15-
** xref:type-definitions/types/unions.adoc[Union]
16-
** xref:type-definitions/types/relationships.adoc[]
17-
* xref:type-definitions/directives/index.adoc[]
18-
** xref:type-definitions/directives/database-mapping.adoc[]
19-
** xref:type-definitions/directives/security/index.adoc[]
20-
*** xref:type-definitions/directives/security/configuration.adoc[]
21-
*** xref:type-definitions/directives/security/authentication.adoc[]
22-
*** xref:type-definitions/directives/security/authorization.adoc[]
23-
*** xref:type-definitions/directives/security/impersonation-and-user-switching.adoc[]
24-
*** xref:type-definitions/directives/security/operations.adoc[]
25-
** xref:type-definitions/directives/autogeneration.adoc[]
26-
** xref:type-definitions/directives/schema-configuration/index.adoc[]
27-
*** xref:type-definitions/directives/schema-configuration/global-configuration.adoc[]
28-
*** xref:type-definitions/directives/schema-configuration/type-configuration.adoc[]
29-
*** xref:type-definitions/directives/schema-configuration/field-configuration.adoc[]
30-
** xref:type-definitions/directives/indexes-and-constraints.adoc[]
31-
** xref:type-definitions/directives/custom-logic.adoc[]
32-
** xref:type-definitions/directives/custom-directives.adoc[]
10+
* xref:types/index.adoc[]
11+
** xref:types/scalar.adoc[Scalar]
12+
** xref:types/temporal.adoc[Temporal]
13+
** xref:types/spatial.adoc[Spatial]
14+
** xref:types/interfaces.adoc[Interfaces]
15+
** xref:types/unions.adoc[Union]
16+
** xref:types/relationships.adoc[]
17+
* xref:directives/index.adoc[]
18+
** xref:directives/database-mapping.adoc[]
19+
** xref:directives/security/index.adoc[]
20+
*** xref:directives/security/configuration.adoc[]
21+
*** xref:directives/security/authentication.adoc[]
22+
*** xref:directives/security/authorization.adoc[]
23+
*** xref:directives/security/impersonation-and-user-switching.adoc[]
24+
*** xref:directives/security/operations.adoc[]
25+
** xref:directives/autogeneration.adoc[]
26+
** xref:directives/schema-configuration/index.adoc[]
27+
*** xref:directives/schema-configuration/global-configuration.adoc[]
28+
*** xref:directives/schema-configuration/type-configuration.adoc[]
29+
*** xref:directives/schema-configuration/field-configuration.adoc[]
30+
** xref:directives/indexes-and-constraints.adoc[]
31+
** xref:directives/custom-logic.adoc[]
32+
** xref:directives/custom-directives.adoc[]
3333
3434
* xref:queries-aggregations/index.adoc[Queries and aggregations]
3535
** xref:queries-aggregations/queries.adoc[]

modules/ROOT/pages/type-definitions/directives/autogeneration.adoc renamed to modules/ROOT/pages/directives/autogeneration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[type-definitions-autogeneration]]
22
= Autogeneration
3-
:page-aliases: type-definitions/autogeneration.adoc
3+
:page-aliases: type-definitions/autogeneration.adoc, type-definitions/directives/autogeneration.adoc
44
:description: This page describes directives used for autogeneration.
55

66

@@ -15,7 +15,7 @@ This enables autogeneration of IDs for the field.
1515
The format of each generated ID is a UUID generated by https://neo4j.com/docs/cypher-manual/current/functions/scalar/#functions-randomuuid[randomUUID() function].
1616
The field will not be present in input types for mutations.
1717

18-
It is recommended to use xref::/type-definitions/directives/indexes-and-constraints.adoc#type-definitions-constraints-unique[`@unique`] in conjunction with this to add a unique node property constraint.
18+
It is recommended to use xref::/directives/indexes-and-constraints.adoc#type-definitions-constraints-unique[`@unique`] in conjunction with this to add a unique node property constraint.
1919

2020
=== Definition
2121

modules/ROOT/pages/type-definitions/directives/custom-directives.adoc renamed to modules/ROOT/pages/directives/custom-directives.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[type-definitions-custom-directives]]
2-
:description: This page describes how to use custom directives in the Neo4j GraphQL Library.
32
= Custom directives
4-
:page-aliases: type-definitions/custom-directives.adoc
3+
:page-aliases: type-definitions/custom-directives.adoc, type-definitions/directives/custom-directives.adoc
4+
:description: This page describes how to use custom directives in the Neo4j GraphQL Library.
55

66
As of https://www.graphql-tools.com/docs/schema-directives[`@graphql-tools`] version 8, the mechanism for defining and applying custom directives has changed significantly, and this is reflected in the Neo4j GraphQL Library.
77

File renamed without changes.

modules/ROOT/pages/type-definitions/directives/database-mapping.adoc renamed to modules/ROOT/pages/directives/database-mapping.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[type-definitions-database-mapping]]
22
= Database mapping
3-
:page-aliases: type-definitions/database-mapping.adoc, type-definitions/basics.adoc, type-definitions/index.adoc
3+
:page-aliases: type-definitions/database-mapping.adoc, type-definitions/basics.adoc, type-definitions/index.adoc, type-definitions/directives/database-mapping.adoc
44
:description: This page describes how to use directives for database mapping.
55

66

@@ -67,7 +67,7 @@ type ActedIn @relationshipProperties {
6767
----
6868

6969
Note that in addition to this type, there is an added key `properties` in the existing `@relationship` directives.
70-
For more information, see xref::/type-definitions/types/relationships.adoc[Type definitions -> Relationships].
70+
For more information, see xref::/types/relationships.adoc[Type definitions -> Relationships].
7171

7272

7373
[[type-definitions-node]]
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
[[directives]]
2+
= Directives
3+
:description: This page lists all directives available in the Neo4j GraphQL Library.
4+
5+
6+
The Neo4j GraphQL Library provides the following directives to be used whilst defining types:
7+
8+
== Database mapping
9+
10+
[cols="2,5"]
11+
|===
12+
| Directive | Description
13+
14+
| xref::/directives/database-mapping.adoc#_relationship[`@relationship`]
15+
| Configures xref::/types/relationships.adoc[relationships] between object types.
16+
17+
| xref::/directives/database-mapping.adoc#_relationship_properties[`@relationshipProperties`]
18+
a| Required to differentiate interfaces that are used for relationship properties, and otherwise.
19+
20+
| xref::/directives/database-mapping.adoc#type-definitions-node[`@node`]
21+
| Specifies the configuration of a GraphQL object type which represents a Neo4j node.
22+
23+
| xref::/directives/database-mapping.adoc#type-definitions-alias[`@alias`]
24+
| Maps a GraphQL schema field to a Neo4j property on a node or relationship.
25+
26+
| xref::/directives/database-mapping.adoc#_declarerelationship[`@declareRelationship`]
27+
| Configure xref::/types/relationships.adoc[relationships] to be implemented on object types.
28+
29+
|===
30+
31+
== Security
32+
33+
[cols="2,5"]
34+
|===
35+
| Directive | Description
36+
37+
| xref::/directives/security/authentication.adoc[`@authentication`]
38+
| Requires authentication checks when accessing the type.
39+
40+
| xref::/directives/security/authorization.adoc[`@authorization`]
41+
| Specifies authorization rules for queries and mutations on the type.
42+
43+
| xref::/directives/security/configuration.adoc#authentication-and-authorization-jwt[`@jwt`]
44+
| Configure the JWT authentication filter to include an additional JWT claim.
45+
46+
| xref::/directives/security/configuration.adoc#_nested_claims[`@jwtClaim`]
47+
| Use in combination with `@jwt`.
48+
Configures the JWT authentication filter to include an additional nested JWT claim.
49+
50+
| `@subscriptionsAuthorization`
51+
| Specifies authorization rules for subscriptions on the type.
52+
53+
|===
54+
55+
== Autogeneration
56+
57+
[cols="2,5"]
58+
|===
59+
| Directive | Description
60+
61+
| xref::/directives/autogeneration.adoc#type-definitions-autogeneration-id[`@id`]
62+
| Marks a field as the unique ID for an object type, and allows for autogeneration of IDs.
63+
64+
| xref::/directives/autogeneration.adoc#type-definitions-autogeneration-timestamp[`@timestamp`]
65+
| Flags fields to be used to store timestamps on `create` and `update` events.
66+
67+
|===
68+
69+
== Schema configuration
70+
71+
[cols="2,5"]
72+
|===
73+
| Directive | Description
74+
75+
| xref:/directives/schema-configuration/type-configuration.adoc#_query[`@query`]
76+
| Limits the availability of query operations in the library.
77+
78+
| xref:/directives/schema-configuration/type-configuration.adoc#_mutation[`@mutation`]
79+
| Limits the availability of Mutation operations in the library.
80+
81+
| xref:/directives/schema-configuration/type-configuration.adoc#_subscription[`@subscription`]
82+
| Limits subscription operations in the library.
83+
84+
| xref::/directives/schema-configuration/type-configuration.adoc#type-definitions-default-values-default[`@default`]
85+
| Allows the setting of a default value for a field during object creation.
86+
87+
| xref::/directives/schema-configuration/type-configuration.adoc#type-definitions-plural[`@plural`]
88+
| Redefines how to compose the plural of the type for the generated operations.
89+
Particularly useful for types that are not correctly pluralized or are non-English words.
90+
91+
| xref:/directives/schema-configuration/field-configuration.adoc#_selectable[`@selectable`]
92+
| Sets the availability of fields on queries and aggregations.
93+
94+
| xref:/directives/schema-configuration/field-configuration.adoc#_settable[`@settable`]
95+
| Sets the availability of fields on the `create` and `update` inputs.
96+
97+
| xref:/directives/schema-configuration/field-configuration.adoc#_filterable[`@filterable`]
98+
| Defines the filters generated for a field.
99+
100+
|===
101+
102+
== Indexes and constraints
103+
104+
[cols="2,5"]
105+
|===
106+
| Directive | Description
107+
108+
| xref::/directives/indexes-and-constraints.adoc#type-definitions-indexes-fulltext[`@fulltext`]
109+
| Indicates that there should be a fulltext index inserted into the database for the specified Node and its properties.
110+
111+
| xref::/directives/indexes-and-constraints.adoc#type-definitions-constraints-unique[`@unique`]
112+
| Indicates that there should be a uniqueness constraint in the database for the fields that it is applied to.
113+
114+
|===
115+
116+
== Custom logic
117+
118+
[cols="2,5"]
119+
|===
120+
| Directive | Description
121+
122+
| xref::/directives/custom-logic.adoc#_cypher[`@cypher`]
123+
| Overrides field resolution (including query and mutation fields), instead resolving with the specified Cypher.
124+
125+
| xref::/directives/custom-logic.adoc#_coalesce[`@coalesce`]
126+
| Exposes a mechanism for querying against non-existent, `null` values on a node.
127+
128+
| xref::/directives/custom-logic.adoc#_limit[`@limit`]
129+
| Used on nodes to inject values into Cypher `LIMIT` clauses.
130+
131+
| xref::/directives/custom-logic.adoc#_customresolver[`@customResolver`]
132+
| Specifies that a field is resolved by a custom resolver, and allows the specification
133+
of any required fields that is passed as arguments to the custom resolver.
134+
135+
| xref::/directives/custom-logic.adoc#_populatedby[`@populatedBy`]
136+
| Specifies a callback function (executed during GraphQL query parsing) to populate fields which have not been provided within the input.
137+
138+
|===
139+
140+
== OGM
141+
142+
[cols="2,5"]
143+
|===
144+
| Directive | Description
145+
146+
| xref::ogm/directives.adoc#_private[`@private`]
147+
| Protects fields which should only be available through the xref::ogm/index.adoc[OGM].
148+
149+
|===
150+
151+
== Relay
152+
153+
[cols="2,5"]
154+
|===
155+
| Directive | Description
156+
157+
| xref:/integrations/relay-compatibility.adoc[`@relayId`]
158+
| Specifies that the field should be used as the global node identifier for Relay.
159+
160+
|===
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ directive @unique(
1919
----
2020

2121
Using this directive does not automatically ensure the existence of these constraints, and you will need to run a function on server startup.
22-
See the section xref::/type-definitions/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints] for details.
22+
See the section xref::/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints] for details.
2323

2424
=== Usage
2525

@@ -83,7 +83,7 @@ directive @fulltext(indexes: [FullTextInput]!) on OBJECT
8383

8484
Using this directive does not automatically ensure the existence of these indexes.
8585
You need to run a function on server startup.
86-
See the section xref::/type-definitions/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints] for details.
86+
See the section xref::/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints] for details.
8787

8888
=== Specifying
8989

@@ -98,7 +98,7 @@ type Product @fulltext(indexes: [{ indexName: "ProductName", fields: ["name"] }]
9898
}
9999
----
100100

101-
When you run xref::/type-definitions/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints], they create the index like so:
101+
When you run xref::/directives/indexes-and-constraints.adoc#_asserting_constraints[Asserting constraints], they create the index like so:
102102

103103
[source, cypher, indent=0]
104104
----
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ type Actor {
143143
*Configure nested operations*
144144

145145
A large part of the schema produced by the library is needed to support nested operations.
146-
These are enabled by the directive `@relationship` as described in xref::/type-definitions/types/relationships.adoc#_inserting_data[`@relationship` -> Inserting data].
146+
These are enabled by the directive `@relationship` as described in xref::/types/relationships.adoc#_inserting_data[`@relationship` -> Inserting data].
147147

148148
The nested operations available are:
149149

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[type-definitions-schema-configuration]]
22
= Schema configuration
3-
:page-aliases: type-definitions/schema-configuration/index.adoc, schema-configuration/index.adoc
3+
:page-aliases: type-definitions/schema-configuration/index.adoc, schema-configuration/index.adoc, type-definitions/directives/schema-configuration/index.adoc
44
:description: This section describes configurations that can be set to a schema in Neo4j GraphQL.
55

66

0 commit comments

Comments
 (0)