Skip to content

Commit 9652411

Browse files
committed
created new pages, slimmed down the introduction
1 parent b7b3453 commit 9652411

File tree

5 files changed

+134
-66
lines changed

5 files changed

+134
-66
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* xref:index.adoc[Introduction]
2+
* xref:using-the-library.adoc[]
23
34
* *Getting started*
45
@@ -74,7 +75,8 @@
7475
7576
* *Versions and support*
7677
78+
* xref:versioning.adoc[]
7779
* xref:migration/index.adoc[Migration guide]
78-
* xref:deprecations.adoc[Deprecations]
80+
* xref:deprecations.adoc[]
7981
* xref:optimization.adoc[]
8082
* xref:troubleshooting.adoc[]

modules/ROOT/pages/getting-started/graphql-aura.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Even with just field suggestions enabled, it is possible for a malicious actor t
3232
=== Type definitions
3333

3434
Paste these **Type definitions**:
35+
3536
[source, graphql, indent=0]
3637
----
3738
type Product @node {

modules/ROOT/pages/index.adoc

Lines changed: 67 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,79 @@
11
[[index]]
22
= Introduction
33
:page-aliases: introduction.adoc
4-
:description: This section describes the Neo4j GraphQL Library.
4+
:description: An introduction to the Neo4j GraphQL Library.
55

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.
6+
The Neo4j GraphQL Library is:
77

8-
With Neo4j as the graph database, the GraphQL Library makes it simple for applications to have data treated as a graph natively from the frontend all the way to storage.
9-
This avoids duplicate schema work and ensures flawless integration between frontend and backend developers.
10-
11-
If you are new to Neo4j and GraphQL take a look at xref:getting-started/index.adoc[Creating a new project] and xref:getting-started/toolbox.adoc[Neo4j GraphQL Toolbox] to learn the fundamentals of the Neo4j GraphQL Library and how to create GraphQL APIs backed by a Neo4j graph database.
8+
* highly flexible and low-code
9+
* open source
10+
* a JavaScript library
11+
* leveraging graph-native data
1212

13+
It enables rapid API development for cross-platform and mobile applications.
1314

1415
== How it works
1516

16-
The Neo4j GraphQL Library requires a set of type definitions that describes the shape of your graph data.
17-
It can generate an entire executable schema with all of the additional types needed to execute queries and mutations to interact with your Neo4j database.
18-
19-
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.
20-
This eliminates the https://www.google.com/search?q=graphql+n%2B1[N+1 Problem], which can make GraphQL implementations slow and inefficient.
21-
22-
The Neo4j GraphQL Library features:
23-
24-
- Automatic generation of xref::queries-aggregations/queries.adoc[Queries] and xref::mutations/index.adoc[Mutations] for CRUD interactions.
25-
- xref::/types/index.adoc[Types], including temporal and spatial.
26-
- Support for both node and relationship properties.
27-
- Extensibility through the xref::/directives/custom-logic.adoc#_cypher[`@cypher` directive] and/or xref::/directives/custom-logic.adoc#_customresolver[Custom Resolvers].
28-
- Extensive xref::filtering.adoc[Filtering], xref::queries-aggregations/sorting.adoc[Sorting] and xref::/queries-aggregations/pagination.adoc[Pagination] options.
29-
- Options for xref::/directives/database-mapping.adoc[Database mapping] and value xref::/directives/autogeneration.adoc[Autogeneration].
30-
- xref::/security/index.adoc[Security options] and additional xref::schema-configuration/index.adoc[Schema Configuration].
31-
- A xref::getting-started/toolbox.adoc[Toolbox] (UI) to experiment with your Neo4j GraphQL API on Neo4j Desktop.
32-
33-
34-
== Interaction
35-
36-
In xref::getting-started/graphql-aura.adoc[] as well as xref::getting-started/graphql-self-hosted.adoc[], a GraphQL server is used to serve the GraphQL schema, so you can interact directly with your API with no frontend.
37-
In case you prefer to use frontend frameworks, these are some clients that interact with GraphQL APIs:
38-
39-
- https://reactjs.org/[React] - support through https://www.apollographql.com/docs/react/[Apollo Client]
40-
- https://vuejs.org/[Vue.js] - support through https://apollo.vuejs.org/[Vue Apollo]
41-
- https://angularjs.org/[AngularJS] - support through https://apollo-angular.com/docs/[Apollo Angular].
42-
43-
44-
== Deployment
45-
46-
There are a variety of methods for deploying GraphQL APIs.
47-
48-
With Aura Console, you can create and use a GraphQL API, see xref::getting-started/graphql-aura.adoc[].
49-
50-
The xref::getting-started/graphql-self-hosted.adoc[] guide uses Apollo Server.
51-
You can check the Apollo documentation on https://www.apollographql.com/docs/apollo-server/deployment[Deployment] for more details.
52-
53-
54-
== Versioning
55-
56-
The Neo4j GraphQL Library uses https://semver.org/[Semantic Versioning].
57-
Given a version number `MAJOR.MINOR.PATCH`, the increment is based on:
58-
59-
- `MAJOR` - incompatible API changes compared to the previous `MAJOR` version, for which you will likely have to migrate
60-
- `MINOR` - new features have been added in a backwards compatible manner
61-
- `PATCH` - bug fixes have been added in a backwards compatible manner.
62-
63-
Additionally, prerelease version numbers may have additional suffixes, for example `MAJOR.MINOR.PATCH-PRERELEASE.NUMBER`, where `PRERELEASE` is one of the following:
64-
65-
- `alpha` - unstable prerelease artifacts, and the API may change between releases during this phase
66-
- `beta` - feature complete prerelease artifacts, which will be more stable than `alpha` releases but will likely still contain bugs
67-
- `rc` - release candidate including artifacts to be promoted to a stable release, in a last effort to find trailing bugs.
68-
69-
`NUMBER` in the suffix is simply an incrementing release number in each phase.
70-
71-
72-
== Requirements
73-
74-
. https://neo4j.com/product/auradb/[Neo4j AuraDB] version 2025.x or https://neo4j.com/deployment-center/#gdb-selfmanaged[Neo4j Database] running the latest 5.x version or above with the APOC core plugin.
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.
18+
19+
It generates an entire executable schema with all additional types needed to execute queries and mutations to interact with your Neo4j database.
20+
21+
For example, consider these type definitions:
22+
23+
[source, graphql, indent=0]
24+
----
25+
type Product @node {
26+
productName: String
27+
category: [Category!]! @relationship(type: "PART_OF", direction: OUT)
28+
}
29+
30+
type Category @node {
31+
categoryName: String
32+
products: [Product!]! @relationship(type: "PART_OF", direction: IN)
33+
}
34+
----
35+
36+
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+
38+
The following mutation creates a new product as well as a new category:
39+
40+
[source, graphql, indent=0]
41+
----
42+
mutation {
43+
createProducts(
44+
input: [
45+
{
46+
productName: "New Product"
47+
category: { create: [{ node: { categoryName: "New Category" } }] }
48+
}
49+
]
50+
) {
51+
products {
52+
productName
53+
category {
54+
categoryName
55+
}
56+
}
57+
}
58+
}
59+
----
60+
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+
See xref:using-the-library.adoc[] to learn how to use the GraphQL Library in your technology stack.
76+
Check out xref:getting-started/index.adoc[] to create a new project, either based on Neo4j Aura or self-hosted.
7577

7678

7779
== Resources
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
= Using the library
2+
:description: Learn how to use the Neo4j GraphQL Library with your technology stack.
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.
16+
17+
18+
== Under the hood
19+
20+
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.
21+
This eliminates the https://www.google.com/search?q=graphql+n%2B1[N+1 Problem], which can make GraphQL implementations slow and inefficient.
22+
23+
24+
== Interaction
25+
26+
In xref::getting-started/graphql-aura.adoc[] as well as xref::getting-started/graphql-self-hosted.adoc[], a GraphQL server serves the GraphQL schema, so you can interact directly with your API with no frontend.
27+
In case you prefer to use frontend frameworks, these are some clients that interact with GraphQL APIs:
28+
29+
- https://reactjs.org/[React] - support through https://www.apollographql.com/docs/react/[Apollo Client]
30+
- https://vuejs.org/[Vue.js] - support through https://apollo.vuejs.org/[Vue Apollo]
31+
- https://angularjs.org/[AngularJS] - support through https://apollo-angular.com/docs/[Apollo Angular].
32+
33+
34+
== Deployment
35+
36+
There are a variety of methods for deploying GraphQL APIs.
37+
38+
With Aura Console, you can create and use a GraphQL API, see xref::getting-started/graphql-aura.adoc[].
39+
40+
The xref::getting-started/graphql-self-hosted.adoc[] guide uses Apollo Server.
41+
You can check the Apollo documentation on https://www.apollographql.com/docs/apollo-server/deployment[Deployment] for more details.
42+
43+
44+
== Requirements
45+
46+
. https://neo4j.com/product/auradb/[Neo4j AuraDB] version 2025.x or https://neo4j.com/deployment-center/#gdb-selfmanaged[Neo4j Database] running the latest 5.x version or above with the APOC core plugin.

modules/ROOT/pages/versioning.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
= Versioning
2+
:description: The approach to versioning of the Neo4j GraphQL Library.
3+
4+
The Neo4j GraphQL Library uses https://semver.org/[Semantic Versioning].
5+
Given a version number `MAJOR.MINOR.PATCH`, the increment is based on:
6+
7+
- `MAJOR` - incompatible API changes compared to the previous `MAJOR` version, for which you will likely have to migrate
8+
- `MINOR` - new features have been added in a backwards compatible manner
9+
- `PATCH` - bug fixes have been added in a backwards compatible manner.
10+
11+
Additionally, prerelease version numbers may have additional suffixes, for example `MAJOR.MINOR.PATCH-PRERELEASE.NUMBER`, where `PRERELEASE` is one of the following:
12+
13+
- `alpha` - unstable prerelease artifacts, and the API may change between releases during this phase
14+
- `beta` - feature complete prerelease artifacts, which will be more stable than `alpha` releases but will likely still contain bugs
15+
- `rc` - release candidate including artifacts to be promoted to a stable release, in a last effort to find trailing bugs.
16+
17+
`NUMBER` in the suffix is simply an incrementing release number in each phase.

0 commit comments

Comments
 (0)