Skip to content

Commit d25a499

Browse files
Merge remote-tracking branch 'upstream/6.x' into remove-ogm-docs
2 parents 8a37ec2 + 0f073a5 commit d25a499

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+436
-457
lines changed

.backportrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"repoOwner": "Neo4j",
3+
"repoName": "docs-graphql",
4+
"prTitle": "[Cherry-pick][{{targetBranch}}] {{commitMessages}}"
5+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: auto-cherry-pick
2+
on:
3+
pull_request_target:
4+
types: ["labeled", "closed"]
5+
6+
jobs:
7+
backport:
8+
name: Cherry-pick PR
9+
runs-on: [ubuntu-latest]
10+
if: |
11+
github.event.pull_request.merged == true
12+
&& contains(github.event.pull_request.labels.*.name, 'auto-cherry-pick')
13+
&& (
14+
(github.event.action == 'labeled' && github.event.label.name == 'auto-cherry-pick')
15+
|| (github.event.action == 'closed')
16+
)
17+
steps:
18+
- name: Cherry-pick action
19+
uses: sorenlouv/backport-github-action@929f69d04adbc196d982e60f02837b6cc00b3129
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
auto_backport_label_prefix: auto-cherry-pick-to-
23+
add_original_reviewers: true
24+
25+
- name: Info log
26+
if: ${{ success() }}
27+
run: cat ~/.backport/backport.info.log
28+
29+
- name: Debug log
30+
if: ${{ failure() }}
31+
run: cat ~/.backport/backport.debug.log

README.adoc

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
= Neo4j GraphQL Library
1+
= Neo4j GraphQL library docs
22

33
This repo contains the documentation for the Neo4j GraphQL Library.
44

5-
== Prereqs
5+
== Prerequisites
66

77
- link:https://nodejs.org/en/download/[Node.js]
88
- npm
@@ -113,3 +113,33 @@ When we publish preview content to either development or production environments
113113

114114
You can use the link:https://www.npmjs.com/package/@neo4j-antora/antora-add-notes[antora-add-notes] extension to add content to your pages.
115115
Follow the Usage instructions in the package documentation.
116+
117+
== Repository and pull requests
118+
119+
=== Enable automatic cherry-picking on a PR
120+
121+
To enable automatic cherry-picking on a PR, add the label `auto-cherry-pick` to it.
122+
Without it, the responsible GitHub action is not going to be triggered.
123+
124+
To select the target branches you would like to cherry-pick your PR to, add labels of the following structure: `auto-cherry-pick-to-<targetBranch>`.
125+
For example: `auto-cherry-pick-to-6.x` to cherry-pick it to the branch `6.x` or `auto-cherry-pick-to-5.x` for the branch `5.x`.
126+
You may even add new labels for branches that do not have such a label yet.
127+
128+
The feature is triggered by either merging a PR with the `auto-cherry-pick` label or by adding the `auto-cherry-pick` label to an already closed and merged PR.
129+
In the latter case, ensure that you first add the labels containing the target branches and then finally the `auto-cherry-pick` label.
130+
Otherwise the automation starts without any target branches.
131+
132+
==== Details
133+
134+
The PRs created by this GitHub action will have their heading prefixed with `[Cherry-pick][<targetBranch>]`.
135+
So, for example, for `6.x` as the target branch and `some changes` as the original PR heading, it results in `[Cherry-pick][6.x] some changes` as the heading for the cherry-picked PR.
136+
In case an assignee was set for the original PR, the cherry-picked PRs will also receive the same assignee.
137+
You must add reviewers manually after the cherry-picked PRs have been created.
138+
139+
The creation of cherry-picked PRs can take a few minutes.
140+
If you are an assignee of the original PR, you receive an email notification once the cherry-picked PRs have been created.
141+
The original PR is updated with a comment that contains links to the newly created cherry-picked PRs.
142+
143+
In case of a merge conflict while cherry-picking to a specific release branch, the branch will be skipped. Information on skipped branches is also included in the comment added to the original PR.
144+
In that case you will have to take care of cherry-picking manually and resolve the conflicts.
145+
This is not going to influence the other release branches as long as they do not have conflicts.

modules/ROOT/pages/directives/autogeneration.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The following type definition specifies the `id` field as an autogenerated value
3131

3232
[source, graphql, indent=0]
3333
----
34-
type User {
34+
type User @node {
3535
id: ID! @id
3636
username: String!
3737
}
@@ -70,7 +70,7 @@ The following type definition has two individual fields to store the timestamps
7070

7171
[source, graphql, indent=0]
7272
----
73-
type User {
73+
type User @node {
7474
createdAt: DateTime! @timestamp(operations: [CREATE])
7575
updatedAt: DateTime! @timestamp(operations: [UPDATE])
7676
}
@@ -80,14 +80,14 @@ The following two equivalent type definitions have a single field storing the ev
8080

8181
[source, graphql, indent=0]
8282
----
83-
type User {
83+
type User @node {
8484
lastModified: DateTime! @timestamp
8585
}
8686
----
8787

8888
[source, graphql, indent=0]
8989
----
90-
type User {
90+
type User @node {
9191
lastModified: DateTime! @timestamp(operations: [CREATE, UPDATE])
9292
}
9393
----

modules/ROOT/pages/directives/custom-directives.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const neoSchema = new Neo4jGraphQL({
5757
typeDefs: [
5858
upperDirectiveTypeDefs,
5959
`#graphql
60-
type Movie {
60+
type Movie @node {
6161
name: String @uppercase
6262
}
6363
`,

modules/ROOT/pages/directives/custom-logic.adoc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ interface Auth {
4747
a| You can use the JWT in the request to return the value of the currently logged in User:
4848
[source, graphql, indent=0]
4949
----
50-
type User {
50+
type User @node {
5151
id: String
5252
}
5353
@@ -117,7 +117,7 @@ Both approaches are demonstrated here:
117117

118118
[source, graphql, indent=0]
119119
----
120-
type User {
120+
type User @node {
121121
id
122122
}
123123
@@ -135,7 +135,7 @@ type Query {
135135

136136
[source, graphql, indent=0]
137137
----
138-
type User {
138+
type User @node {
139139
id
140140
}
141141
@@ -185,13 +185,13 @@ In the following example, the field `similarMovies` is bound to the `Movie` type
185185

186186
[source, graphql, indent=0]
187187
----
188-
type Actor {
188+
type Actor @node {
189189
actorId: ID!
190190
name: String
191191
movies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT)
192192
}
193193
194-
type Movie {
194+
type Movie @node {
195195
movieId: ID!
196196
title: String
197197
description: String
@@ -216,7 +216,7 @@ The following example demonstrates a query to return all of the actors in the da
216216

217217
[source, graphql, indent=0]
218218
----
219-
type Actor {
219+
type Actor @node {
220220
actorId: ID!
221221
name: String
222222
}
@@ -239,7 +239,7 @@ The following example demonstrates a mutation using a Cypher query to insert a s
239239

240240
[source, graphql, indent=0]
241241
----
242-
type Actor {
242+
type Actor @node {
243243
actorId: ID!
244244
name: String
245245
}
@@ -291,7 +291,7 @@ enum Status {
291291
ACTIVE
292292
INACTIVE
293293
}
294-
type Movie {
294+
type Movie @node {
295295
status: Status @coalesce(value: ACTIVE)
296296
}
297297
----
@@ -345,7 +345,7 @@ Take, for instance, this schema:
345345
[source, javascript, indent=0]
346346
----
347347
const typeDefs = `
348-
type User {
348+
type User @node {
349349
firstName: String!
350350
lastName: String!
351351
fullName: String! @customResolver(requires: "firstName lastName")
@@ -397,13 +397,13 @@ Using a selection set string makes it possible to select fields from related typ
397397
[source, javascript, indent=0]
398398
----
399399
const typeDefs = `
400-
type Address {
400+
type Address @node {
401401
houseNumber: Int!
402402
street: String!
403403
city: String!
404404
}
405405
406-
type User {
406+
type User @node {
407407
id: ID!
408408
firstName: String!
409409
lastName: String!
@@ -437,7 +437,7 @@ interface Publication {
437437
publicationYear: Int!
438438
}
439439
440-
type Author {
440+
type Author @node {
441441
name: String!
442442
publications: [Publication!]! @relationship(type: "WROTE", direction: OUT)
443443
publicationsWithAuthor: [String!]!
@@ -446,13 +446,13 @@ type Author {
446446
)
447447
}
448448
449-
type Book implements Publication {
449+
type Book implements Publication @node {
450450
title: String!
451451
publicationYear: Int!
452452
author: [Author!]! @relationship(type: "WROTE", direction: IN)
453453
}
454454
455-
type Journal implements Publication {
455+
type Journal implements Publication @node {
456456
subject: String!
457457
publicationYear: Int!
458458
author: [Author!]! @relationship(type: "WROTE", direction: IN)
@@ -468,7 +468,7 @@ interface Publication {
468468
publicationYear: Int!
469469
}
470470
471-
type Author {
471+
type Author @node {
472472
name: String!
473473
publications: [Publication!]! @relationship(type: "WROTE", direction: OUT)
474474
publicationsWithAuthor: [String!]!
@@ -477,13 +477,13 @@ type Author {
477477
)
478478
}
479479
480-
type Book implements Publication {
480+
type Book implements Publication @node {
481481
title: String!
482482
publicationYear: Int!
483483
author: [Author!]! @relationship(type: "WROTE", direction: IN)
484484
}
485485
486-
type Journal implements Publication {
486+
type Journal implements Publication @node {
487487
subject: String!
488488
publicationYear: Int!
489489
author: [Author!]! @relationship(type: "WROTE", direction: IN)
@@ -525,7 +525,7 @@ Type definitions:
525525

526526
[source, graphql, indent=0]
527527
----
528-
type Product {
528+
type Product @node {
529529
name: String!
530530
slug: String! @populatedBy(callback: "slug", operations: [CREATE, UPDATE])
531531
}
@@ -561,7 +561,7 @@ For example, if you want a field `modifiedBy`:
561561

562562
[source, graphql, indent=0]
563563
----
564-
type Record {
564+
type Record @node {
565565
content: String!
566566
modifiedBy: @populatedBy(callback: "modifiedBy", operations: [CREATE, UPDATE])
567567
}

0 commit comments

Comments
 (0)