You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/getting-started/toolbox.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ With it, you can:
15
15
16
16
== Connect to a Neo4j database
17
17
18
-
Before you start using the Toolbox, make sure you have followed all xref:index.adoc#_requirements[requirements] to run a Neo4j database.
18
+
Before you start using the Toolbox, make sure you have followed all xref::integrating-the-library.adoc#_requirements[requirements] to run a Neo4j database.
19
19
You can use https://neo4j.com/docs/desktop-manual/current/[Neo4j Desktop] or https://neo4j.com/docs/aura/auradb/[Neo4j AuraDB] for that.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/index.adoc
+47-25Lines changed: 47 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,22 +3,45 @@
3
3
:page-aliases: introduction.adoc
4
4
:description: An introduction to the Neo4j GraphQL Library.
5
5
6
-
The Neo4j GraphQL Library is:
6
+
The Neo4j GraphQL Library is a highly flexible, low-code, open source JavaScript library that enables rapid API development for cross-platform and mobile applications by tapping into the power of connected data.
7
7
8
-
* highly flexible and low-code
9
-
* open source
10
-
* a JavaScript library
11
-
* leveraging graph-native data
8
+
== How it works
12
9
13
-
It enables rapid API development for cross-platform and mobile applications.
10
+
Here is an example of how you can query existing data:
14
11
15
-
== How it works
12
+
[source, graphql, indent=0]
13
+
----
14
+
query {
15
+
products {
16
+
productName
17
+
category {
18
+
categoryName
19
+
}
20
+
}
21
+
}
22
+
----
16
23
17
-
The Neo4j GraphQL Library requires a set of type definitions that describes the shape of your graph data and creates an API layer to communicate with the data.
24
+
The response looks like this:
18
25
19
-
It generates an entire executable schema with all additional types needed to execute queries and mutations to interact with your Neo4j database.
26
+
[source, json, indent=0]
27
+
----
28
+
{
29
+
"data": {
30
+
"products": [
31
+
{
32
+
"productName": "New Product",
33
+
"category": [
34
+
{
35
+
"categoryName": "New Category"
36
+
}
37
+
]
38
+
}
39
+
]
40
+
}
41
+
}
42
+
----
20
43
21
-
For example, consider these type definitions:
44
+
For the example query to work, the library requires the following type definitions:
22
45
23
46
[source, graphql, indent=0]
24
47
----
@@ -35,7 +58,7 @@ type Category @node {
35
58
36
59
Based on these type definitions, the library generates query and mutation templates to create new instances of the types as well as query existing instances.
37
60
38
-
The following mutation creates a new product as well as a new category:
61
+
The following mutation creates the new product and the new category which were queried above:
39
62
40
63
[source, graphql, indent=0]
41
64
----
@@ -58,27 +81,26 @@ mutation {
58
81
}
59
82
----
60
83
61
-
Here is an example of how you can query existing data:
62
-
63
-
[source, graphql, indent=0]
64
-
----
65
-
query {
66
-
products {
67
-
productName
68
-
category {
69
-
categoryName
70
-
}
71
-
}
72
-
}
73
-
----
74
-
75
84
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.
76
85
This eliminates the https://www.google.com/search?q=graphql+n%2B1[N+1 Problem], which can make GraphQL implementations slow and inefficient.
77
86
78
87
See xref:using-the-library.adoc[] to learn how to use the GraphQL Library in your technology stack.
79
88
Check out xref:getting-started/index.adoc[] to create a new project, either based on Neo4j Aura or self-hosted.
80
89
81
90
91
+
== Library features
92
+
93
+
- Automatic generation of xref::queries-aggregations/queries.adoc[Queries] and xref::mutations/index.adoc[Mutations] for CRUD interactions.
94
+
- xref::/types/index.adoc[Types], including temporal and spatial.
95
+
- Support for both node and relationship properties.
96
+
- Extensive xref::filtering.adoc[Filtering], xref::queries-aggregations/sorting.adoc[Sorting] and xref::/queries-aggregations/pagination.adoc[Pagination] options.
97
+
- xref::/security/index.adoc[Security options] and additional xref::schema-configuration/index.adoc[Schema Configuration].
98
+
- xref:/subscriptions/index.adoc[Subscriptions] to server events.
- Extensibility through the xref::/directives/custom-logic.adoc#_cypher[`@cypher` directive] and/or xref::/directives/custom-logic.adoc#_customresolver[Custom Resolvers].
101
+
- A xref::getting-started/toolbox.adoc[Toolbox] (UI) to experiment with your Neo4j GraphQL API on Neo4j Desktop.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/integrating-the-library.adoc
+1-14Lines changed: 1 addition & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,6 @@
1
-
= Using the library
1
+
= Integrating the library
2
2
:description: Learn how to use the Neo4j GraphQL Library with your technology stack.
3
3
4
-
== Library features
5
-
6
-
The Neo4j GraphQL Library features:
7
-
8
-
- Automatic generation of xref::queries-aggregations/queries.adoc[Queries] and xref::mutations/index.adoc[Mutations] for CRUD interactions.
9
-
- xref::/types/index.adoc[Types], including temporal and spatial.
10
-
- Support for both node and relationship properties.
11
-
- Extensibility through the xref::/directives/custom-logic.adoc#_cypher[`@cypher` directive] and/or xref::/directives/custom-logic.adoc#_customresolver[Custom Resolvers].
12
-
- Extensive xref::filtering.adoc[Filtering], xref::queries-aggregations/sorting.adoc[Sorting] and xref::/queries-aggregations/pagination.adoc[Pagination] options.
13
-
- Options for xref::/directives/database-mapping.adoc[Database mapping] and value xref::/directives/autogeneration.adoc[Autogeneration].
14
-
- xref::/security/index.adoc[Security options] and additional xref::schema-configuration/index.adoc[Schema Configuration].
15
-
- A xref::getting-started/toolbox.adoc[Toolbox] (UI) to experiment with your Neo4j GraphQL API on Neo4j Desktop.
0 commit comments