Skip to content

Commit 3323629

Browse files
authored
Merge pull request #275 from neo4j/rework-index
Rework index
2 parents b7b3453 + 208f605 commit 3323629

File tree

7 files changed

+147
-57
lines changed

7 files changed

+147
-57
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:integrating-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/getting-started/graphql-self-hosted.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This tutorial shows you how to:
1414
- Make sure that you have https://nodejs.org/en/[Node.js] 20+ installed.
1515
- The examples use the default `npm` package manager, but you can use other package managers.
1616
- Set up a https://neo4j.com[Neo4j database].
17-
Make sure it fulfills the xref::index.adoc#_requirements[requirements], including the necessary plugins.
17+
Make sure it fulfills the xref::integrating-the-library.adoc#_requirements[requirements], including the necessary plugins.
1818

1919

2020
== Set up a directory

modules/ROOT/pages/getting-started/toolbox.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ With it, you can:
1515

1616
== Connect to a Neo4j database
1717

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.
1919
You can use https://neo4j.com/docs/desktop-manual/current/[Neo4j Desktop] or https://neo4j.com/docs/aura/auradb/[Neo4j AuraDB] for that.
2020

2121

modules/ROOT/pages/index.adoc

Lines changed: 86 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,111 @@
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

66
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.
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.
12-
138

149
== How it works
1510

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.
11+
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.
12+
13+
It generates an entire executable schema with all additional types needed to execute queries and mutations to interact with your Neo4j database.
14+
15+
For example, consider these type definitions:
16+
17+
[source, graphql, indent=0]
18+
----
19+
type Product @node {
20+
productName: String
21+
category: [Category!]! @relationship(type: "PART_OF", direction: OUT)
22+
}
23+
24+
type Category @node {
25+
categoryName: String
26+
products: [Product!]! @relationship(type: "PART_OF", direction: IN)
27+
}
28+
----
29+
30+
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.
31+
32+
The following mutation creates a new product as well as a new category:
33+
34+
[source, graphql, indent=0]
35+
----
36+
mutation {
37+
createProducts(
38+
input: [
39+
{
40+
productName: "New Product"
41+
category: { create: [{ node: { categoryName: "New Category" } }] }
42+
}
43+
]
44+
) {
45+
products {
46+
productName
47+
category {
48+
categoryName
49+
}
50+
}
51+
}
52+
}
53+
----
54+
55+
Here is an example of how you can query existing data:
56+
57+
[source, graphql, indent=0]
58+
----
59+
query {
60+
products {
61+
productName
62+
category {
63+
categoryName
64+
}
65+
}
66+
}
67+
----
68+
69+
The response looks like this:
70+
71+
[source, json, indent=0]
72+
----
73+
{
74+
"data": {
75+
"products": [
76+
{
77+
"productName": "New Product",
78+
"category": [
79+
{
80+
"categoryName": "New Category"
81+
}
82+
]
83+
}
84+
]
85+
}
86+
}
87+
----
1888

1989
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.
2090
This eliminates the https://www.google.com/search?q=graphql+n%2B1[N+1 Problem], which can make GraphQL implementations slow and inefficient.
2191

22-
The Neo4j GraphQL Library features:
92+
See xref:integrating-the-library.adoc[] to learn how to use the GraphQL Library in your technology stack.
93+
Check out xref:getting-started/index.adoc[] to create a new project, either based on Neo4j Aura or self-hosted.
94+
95+
96+
== Library features
2397

2498
- Automatic generation of xref::queries-aggregations/queries.adoc[Queries] and xref::mutations/index.adoc[Mutations] for CRUD interactions.
2599
- xref::/types/index.adoc[Types], including temporal and spatial.
26100
- 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].
28101
- 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].
30102
- xref::/security/index.adoc[Security options] and additional xref::schema-configuration/index.adoc[Schema Configuration].
103+
- xref:/subscriptions/index.adoc[Subscriptions] to server events.
104+
- xref:integrations/apollo-federation.adoc[Apollo federation integration].
105+
- Extensibility through the xref::/directives/custom-logic.adoc#_cypher[`@cypher` directive] and/or xref::/directives/custom-logic.adoc#_customresolver[Custom Resolvers].
31106
- A xref::getting-started/toolbox.adoc[Toolbox] (UI) to experiment with your Neo4j GraphQL API on Neo4j Desktop.
32107

33108

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.
75-
76-
77109
== Resources
78110

79111
. https://github.com/neo4j/graphql[GitHub]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
= Integrating the library
2+
:description: Learn how to use the Neo4j GraphQL Library with your technology stack.
3+
4+
5+
== Interaction
6+
7+
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.
8+
In case you prefer to use frontend frameworks, these are some clients that interact with GraphQL APIs:
9+
10+
- https://reactjs.org/[React] - support through https://www.apollographql.com/docs/react/[Apollo Client]
11+
- https://vuejs.org/[Vue.js] - support through https://apollo.vuejs.org/[Vue Apollo]
12+
- https://angularjs.org/[AngularJS] - support through https://apollo-angular.com/docs/[Apollo Angular].
13+
14+
15+
== Deployment
16+
17+
There are a variety of methods for deploying GraphQL APIs.
18+
19+
With Aura Console, you can create and use a GraphQL API, see xref::getting-started/graphql-aura.adoc[].
20+
21+
The xref::getting-started/graphql-self-hosted.adoc[] guide uses Apollo Server.
22+
You can check the Apollo documentation on https://www.apollographql.com/docs/apollo-server/deployment[Deployment] for more details.
23+
24+
25+
== Requirements
26+
27+
. 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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
= Versioning
2+
:description: The approach to versioning of the Neo4j GraphQL Library.
3+
4+
5+
== LTS version
6+
7+
GraphQL Library version 5 is the long-term support (LTS) version.
8+
It is maintained but no new features are added to it.
9+
10+
Version 7 is the recommended version and actively being developed.
11+
12+
13+
== Semantic versioning
14+
15+
The Neo4j GraphQL Library uses https://semver.org/[Semantic Versioning].
16+
Given a version number `MAJOR.MINOR.PATCH`, the increment is based on:
17+
18+
- `MAJOR` - incompatible API changes compared to the previous `MAJOR` version, for which you will likely have to migrate.
19+
- `MINOR` - new features have been added in a backwards compatible manner.
20+
- `PATCH` - bug fixes have been added in a backwards compatible manner.
21+
22+
Additionally, prerelease version numbers may have additional suffixes, for example `MAJOR.MINOR.PATCH-PRERELEASE.NUMBER`, where `PRERELEASE` is one of the following:
23+
24+
- `alpha` - unstable prerelease artifacts, and the API may change between releases during this phase
25+
- `beta` - feature complete prerelease artifacts, which will be more stable than `alpha` releases but will likely still contain bugs
26+
- `rc` - release candidate including artifacts to be promoted to a stable release, in a last effort to find trailing bugs.
27+
28+
`NUMBER` in the suffix is simply an incrementing release number in each phase.

0 commit comments

Comments
 (0)