Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
= Authentication and Authorization
:page-aliases: auth/index.adoc, auth/setup.adoc, auth/authentication.adoc, \
auth/authorization.adoc, auth/auth-directive.adoc, auth/subscriptions.adoc, \
auth/authorization/allow.adoc, auth/authorization/bind.adoc, auth/authorization/roles.adoc, \
auth/authorization/where.adoc, guides/v4-migration/authorization.adoc


[WARNING]
====
Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/custom-resolvers.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[[custom-resolvers]]
= Custom Resolvers
:page-aliases: ogm/examples/custom-resolvers.adoc

The library will autogenerate query and mutation resolvers, so you don’t need to implement those resolvers yourself. However, if you would like additional behaviours besides the autogenerated CRUD operations, you can specify custom resolvers for these scenarios.

The library will autogenerate query and mutation resolvers, so you don't need to implement those resolvers yourself. However, if you would like additional behaviours besides the autogenerated CRUD operations, you can specify custom resolvers for these scenarios.

== Custom object type field resolver

Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/getting-started/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[getting-started]]
:description: This section describes how to get started with the Neo4j GraphQL Library.
= Getting started
:page-aliases: getting-started.adoc
:description: This section describes how to get started with the Neo4j GraphQL Library.


This tutorial walks you through creating a new project with the Neo4j GraphQL Library.

Expand Down
3 changes: 2 additions & 1 deletion modules/ROOT/pages/getting-started/toolbox.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[Toolbox]]
:description: This page describes the functionalities of the Neo4j GraphQL Toolbox.
= Neo4j GraphQL Toolbox
:page-aliases: toolbox.adoc
:description: This page describes the functionalities of the Neo4j GraphQL Toolbox.

The https://graphql-toolbox.neo4j.io[Neo4j GraphQL Toolbox] is an onboarding, low-code tool that can be integrated to Neo4j.
It was created for development and experimentation with Neo4j GraphQL APIs.
Expand Down
3 changes: 2 additions & 1 deletion modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[index]]
:description: This section describes the Neo4j GraphQL Library.
= Neo4j GraphQL Library
:page-aliases: introduction.adoc
:description: This section describes the Neo4j GraphQL Library.

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.

Expand Down
3 changes: 2 additions & 1 deletion modules/ROOT/pages/integrations/apollo-federation.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[apollo-federation]]
:description: This guide shows how to create a subgraph using the Neo4j GraphQL Library, for composition into a supergraph using Apollo Federation.
= Apollo Federation
:page-aliases: guides/apollo-federation.adoc
:description: This guide shows how to create a subgraph using the Neo4j GraphQL Library, for composition into a supergraph using Apollo Federation.

This guide shows how to create a subgraph using the Neo4j GraphQL Library, for composition into a supergraph using Apollo Federation.

Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/integrations/nextjs.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[next.js]]
:description: This page shows information on how to use the Neo4j GraphQL Library with Next.js
= Next.js
:description: This page shows information on how to use the Neo4j GraphQL Library with Next.js
:page-aliases: guides/frameworks/nextjs.adoc


This https://github.com/vercel/next.js/tree/canary/examples/with-apollo-neo4j-graphql[example project] in the Next.js repository demonstrates how to use Neo4j with https://neo4j.com/docs/getting-started/appendix/example-data/[the "Movies" example], the Neo4j GraphQL Library and https://www.apollographql.com/docs/apollo-server/[Apollo Server].
See the https://github.com/vercel/next.js/blob/canary/examples/with-apollo-neo4j-graphql/README.md[README] file for more instructions.
2 changes: 2 additions & 0 deletions modules/ROOT/pages/migration/index.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[migration-guide]]
= Migration from `neo4j-graphql-js`
:page-aliases: guides/index.adoc, guides/migration-guide/index.adoc, guides/migration-guide/server.adoc, guides/migration-guide/type-definitions.adoc, guides/migration-guide/mutations.adoc


`@neo4j/graphql` was never intended to be a drop-in replacement for `neo4j-graphql-js`. However, simple applications should have a fairly trivial migration process.

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/pages/migration/v2-migration.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[v2-migration]]
= 2.0.0 Migration
:page-aliases: guides/v2-migration/index.adoc, guides/v2-migration/miscellaneous.adoc, guides/v2-migration/unions.adoc, guides/v2-migration/mutations.adoc


Version 2.0.0 of `@neo4j/graphql` adds support for relationship properties, with some breaking changes to facilitate these new features. All of the required changes will be on the client side, and this guide will walk through what has changed.

Expand Down
3 changes: 3 additions & 0 deletions modules/ROOT/pages/migration/v3-migration.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[[v3-migration]]
= 3.0.0 Migration
:page-aliases: guides/v3-migration/index.adoc


This document lists all breaking changes from version 2.x.y to 3.0.0 and how to update.

== How to upgrade
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= Authentication and Authorization
:page-aliases: auth/global-authentication.adoc

The largest breaking change in version 4.0.0 is the removal of the `@auth` directive, which requires a migration to the new `@authentication`, `@authorization` and `@subscriptionsAuthorization` directives.

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/pages/migration/v4-migration/index.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[v4-migration]]
= 4.0.0 Migration
:page-aliases: guides/v4-migration/index.adoc


This document lists all breaking changes from version 3.x.y to 4.0.0 and how to update.

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/pages/migration/v4-migration/ogm.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
= OGM
:page-aliases: guides/v4-migration/ogm.adoc


== Specifying which database to use when using the OGM

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/pages/mutations/delete.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[mutations-delete]]
:description: This page describes how to delete nodes using mutations.


= `delete`

Using these type definitions:
Expand Down
3 changes: 2 additions & 1 deletion modules/ROOT/pages/mutations/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[mutations]]
:description: This section describes how to use mutations with the Neo4j GraphQL Library.
= Mutations
:description: This section describes how to use mutations with the Neo4j GraphQL Library.


This section addresses basic examples of the following mutations:

Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/mutations/update.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[mutations-update]]
:description: This page describes how to update nodes through mutations.
= `update`
:page-aliases: array-methods.adoc, mathematical-operators.adoc
:description: This page describes how to update nodes through mutations.


Using these type definitions:

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/pages/ogm/examples.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[ogm-examples]]
= Examples
:page-aliases: ogm/examples/rest-api.adoc


This chapter runs through some examples of how you might take advantage of the OGM.

Expand Down
6 changes: 5 additions & 1 deletion modules/ROOT/pages/ogm/reference.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[[ogm-api-reference]]
= API Reference
:page-aliases: ogm/api-reference/model/aggregate.adoc, ogm/api-reference/model/create.adoc, \
ogm/api-reference/model/find.adoc, ogm/api-reference/model/delete.adoc, \
ogm/api-reference/model/update.adoc, ogm/api-reference/model/index.adoc, \
ogm/api-reference/index.adoc, ogm/api-reference/ogm.adoc, ogm/api-reference/type-generation.adoc


[[ogm-api-reference-ogm]]
== `OGM`

=== `constructor`
Expand Down
3 changes: 2 additions & 1 deletion modules/ROOT/pages/queries-aggregations/filtering.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[filtering]]
:description: This page describes filtering operators.
= Filtering
:page-aliases: filtering.adoc
:description: This page describes filtering operators.

When querying for data, a number of operators are available for different types in the `where` argument of a query or mutation.

Expand Down
3 changes: 2 additions & 1 deletion modules/ROOT/pages/queries-aggregations/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[queries-aggregations]
:description: This section describes queries and aggregations.
= Queries and aggregations
:page-aliases: queries.adoc
:description: This section describes queries and aggregations.

Each node defined in type definitions has two query fields generated for it: one for *querying* data and another one for *aggregating* it.
Each of these fields, by their part, accepts two arguments used for *filtering*, *sorting*, and *pagination*.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[pagination-cursor-based]]
= Cursor-based pagination
:page-aliases: pagination/cursor-based.adoc


On relationship fields, you are able to take advantage of cursor-based pagination, which is often associated with infinitely-scrolling applications.

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/pages/queries-aggregations/pagination/index.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[pagination]]
= Pagination
:page-aliases: pagination/index.adoc


The Neo4j GraphQL Library offers two mechanisms for pagination:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[[pagination-offset-based]]
= Offset-based pagination
:page-aliases: pagination/offset-based.adoc

Offset-based pagination, often associated with navigation via pages, can be achieved through the use of the `offset` and `limit` options available when querying for data.

Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/queries-aggregations/queries.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[queries]]
:description: This page describes how to read or fetch values in the Neo4j GraphQL Library.
= Queries
:page-aliases: guides/migration-guide/queries.adoc
:description: This page describes how to read or fetch values in the Neo4j GraphQL Library.


Based on the given <<queries-aggregations/index.adoc#examples-reference, type definitions>>, here are two examples of how to write queries for reading or fetching values:

Expand Down
3 changes: 2 additions & 1 deletion modules/ROOT/pages/queries-aggregations/sorting.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[sorting]]
:description: This page describes how to use sorting input types.
= Sorting
:page-aliases: sorting.adoc
:description: This page describes how to use sorting input types.

A sorting input type is generated for every object type defined in your type definitions.
It allows for query results to be sorted by each individual field.
Expand Down
1 change: 1 addition & 0 deletions modules/ROOT/pages/reference/api-reference/index.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[[api-reference]]
= API Reference
:page-aliases: api-reference/index.adoc

- xref::reference/api-reference/neo4jgraphql.adoc[`Neo4jGraphQL`]
- xref::reference/api-reference/ogm.adoc[`@neo4j/graphql-ogm`]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[[api-reference-neo4jgraphql]]
= `Neo4jGraphQL`
:page-aliases: api-reference/neo4jgraphql.adoc

== `constructor`

Expand Down
1 change: 1 addition & 0 deletions modules/ROOT/pages/reference/api-reference/ogm.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[[api-reference-ogm]]
= `@neo4j/graphql-ogm`
:page-aliases: api-reference/ogm.adoc

See xref::ogm/reference.adoc[`OGM`].
1 change: 1 addition & 0 deletions modules/ROOT/pages/reference/directives/cypher.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[[type-definitions-cypher]]
= `@cypher` directive
:page-aliases: type-definitions/cypher.adoc

The `@cypher` directive binds a GraphQL field to the result(s) of a Cypher query.

Expand Down
1 change: 1 addition & 0 deletions modules/ROOT/pages/reference/directives/index.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[[directives]]
= Directives
:page-aliases: directives.adoc

== `@alias`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[schema-configuration-type-configuration]]
= Type Configuration


When representing a Neo4j Node, a GraphQL Object type produces multiple operation fields in the `Query`, `Mutation`, and `Subscription` types.
For example:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[schema-configuration-type-configuration]]
= Type Configuration


When representing a Neo4j Node, a GraphQL Object type produces multiple operation fields in the `Query`, `Mutation`, and `Subscription` types.
For example:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[schema-configuration-field-configuration]]
:description: This page describes how to use the directives @selectable, @settable, @filterable and `@relationship` to control how fields are exposed.
= Field configuration
:page-aliases: type-definitions/schema-configuration/field-configuration.adoc
:description: This page describes how to use the directives @selectable, @settable, @filterable and `@relationship` to control how fields are exposed.


In case you need to remove fields from a GraphQL Object Type or a GraphQL Input Object Type, consider the following type definitions:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[schema-configuration-global-configuration]]
:description: This page describes how to globally disable specific types of operations.
= Global configuration
:page-aliases: type-definitions/schema-configuration/global-configuration.adoc
:description: This page describes how to globally disable specific types of operations.


Through the schema configuration, it is possible to globally disable specific types of operation.
To set up operations individually, refer to xref:/schema-configuration/type-configuration.adoc[Type Configuration].
Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/schema-configuration/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[type-definitions-schema-configuration]]
:description: This section describes configurations that can be set to a schema in Neo4j GraphQL.
= Schema configuration
:page-aliases: type-definitions/schema-configuration/index.adoc
:description: This section describes configurations that can be set to a schema in Neo4j GraphQL.


Neo4j GraphQL Library supports several functionalities such as CRUD operations, aggregation, filtering, and others.
To make them work, a large amount of GraphQL types are generated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[schema-configuration-type-configuration]]
:description: This page describes how to reduce the operation fields produced using the directives @query, @mutation, and @subscription.
= Type configuration
:page-aliases: type-definitions/schema-configuration/type-configuration.adoc
:description: This page describes how to reduce the operation fields produced using the directives @query, @mutation, and @subscription.


When representing a Neo4j node, a GraphQL Object Type produces multiple operation fields in the `Query`, `Mutation`, and `Subscription` types.
For example:
Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/subscriptions/engines.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[subscription-engines]]
:description: This page describes how a GraphQL subscription may be set along with a @neo4j/graphql server.
= Subscription engines
:page-aliases: subscriptions/plugins/index.adoc, subscriptions/plugins/amqp.adoc, subscriptions/plugins/single-instance.adoc
:description: This page describes how a GraphQL subscription may be set along with a @neo4j/graphql server.


This page describes different ways to set up a GraphQL subscription along with a `@neo4j/graphql` server.

Expand Down
34 changes: 7 additions & 27 deletions modules/ROOT/pages/subscriptions/events.adoc
Original file line number Diff line number Diff line change
@@ -1,39 +1,19 @@
[[subscription-events]]
:description: This page covers a variety of subscription options offered by the Neo4j GraphQL Library.
= Subscription events
:page-aliases: subscriptions/events/create.adoc, \
subscriptions/events/create_relationship.adoc, subscriptions/events/delete.adoc, subscriptions/events/delete_relationship.adoc, \
subscriptions/events/update.adoc
:description: This page covers a variety of subscription options offered by the Neo4j GraphQL Library.


This page covers a variety of subscription options offered by the Neo4j GraphQL Library.

[NOTE]
===
====
Only changes made through `@neo4j/graphql` should trigger the events here described.
Changes made directly to the database or using the xref::reference/directives/cypher.adoc[`@cypher` directive] will **not** trigger any event.
===

== `CREATE`

Subscriptions to `CREATE` events listen *only* to newly created nodes, not new relationships.
In this occasion, a new event is triggered for each new node, containing its properties.

This action is performed with the top-level subscription `[type]Created`, which contains the following fields:

* `event`: the event triggering this subscription (in this case, `CREATE`).
* `created<typename>`: top-level properties of the newly created node, without relationships.
* `timestamp`: the timestamp in which the mutation was made.
If a same query triggers multiple events, they should have the same timestamp.

As an example, consider the following type definitions:

[source,graphql,indent=0]
----
type Movie {
title: String
genre: String
}
----
====

Note, however, that only changes made through `@neo4j/graphql` should trigger events.
Changes made directly to the database or using the xref::reference/directives/cypher.adoc[`@cypher` directive] will **not** trigger any event.

== `CREATE`

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/pages/troubleshooting.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[troubleshooting]]
= Troubleshooting
:page-aliases: troubleshooting/faqs.adoc, troubleshooting/security.adoc, troubleshooting/optimizing-create-operations.adoc, appendix/preventing-overfetching.adoc, appendix.adoc


This chapter contains common troubleshooting steps. Additionally, there is a section for xref::troubleshooting.adoc#troubleshooting-faqs[FAQs] (Frequently Asked Questions) where you might find answers to your problems.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[type-definitions-autogeneration]]
:description: This page describes directives used for autogeneration.
= Autogeneration
:page-aliases: type-definitions/autogeneration.adoc
:description: This page describes directives used for autogeneration.


This page describes directives used for autogeneration:

Expand Down
4 changes: 3 additions & 1 deletion modules/ROOT/pages/type-definitions/directives/basics.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[[type-definitions-basics]]
:description: This page describes basic notions about how to use directives with the Neo4j GraphQL Library.
= Basics
:page-aliases: type-definitions/basics.adoc, type-definitions/index.adoc
:description: This page describes basic notions about how to use directives with the Neo4j GraphQL Library.


Each type in your GraphQL type definitions can be mapped to an entity in your Neo4j database, such as nodes, relationships, and relationship properties.
This page describes how that can be done.
Expand Down
Loading