Skip to content

Commit 2b953c5

Browse files
lidiazuinrecrwplaymjfwebbdarrellwarde
authored
Improving consistency of tables #96 (#97)
* Add page-aliases for version 4 (#31) (#32) Co-authored-by: Neil Dewhurst <[email protected]> * Editorial review of the latest additions (#34) * Update publish.yml * Editorial review of the most recent changes * reverting changes to partials * fixing note formatting * Add page-aliases for version 4 (#31) (#32) Co-authored-by: Neil Dewhurst <[email protected]> * Editorial review of the most recent changes * fixing note formatting * Add page-aliases for version 4 (#31) (#32) Co-authored-by: Neil Dewhurst <[email protected]> * Editorial review of the most recent changes * fixing note formatting * Add page-aliases for version 4 (#31) (#32) Co-authored-by: Neil Dewhurst <[email protected]> * Editorial review of the most recent changes * Add page-aliases for version 4 (#31) * revert * Apply suggestions from code review Co-authored-by: Michael Webb <[email protected]> --------- Co-authored-by: Neil Dewhurst <[email protected]> Co-authored-by: Michael Webb <[email protected]> * Fix scalar description placeholders #38 (#39) * Editorial review of the most recent changes * reverting changes to partials * fixing note formatting * Add page-aliases for version 4 (#31) (#32) Co-authored-by: Neil Dewhurst <[email protected]> * Editorial review of the most recent changes * fixing note formatting * Editorial review of the most recent changes * fixing note formatting * Add page-aliases for version 4 (#31) (#32) Co-authored-by: Neil Dewhurst <[email protected]> * Editorial review of the most recent changes * Fix scalar description placeholders (#38) --------- Co-authored-by: Neil Dewhurst <[email protected]> Co-authored-by: Darrell Warde <[email protected]> * Editorial review of the most recent changes * reverting changes to partials * Add page-aliases for version 4 (#31) (#32) Co-authored-by: Neil Dewhurst <[email protected]> * Editorial review of the most recent changes * Editorial review of the most recent changes * fixing note formatting * Add page-aliases for version 4 (#31) (#32) Co-authored-by: Neil Dewhurst <[email protected]> * Editorial review of the most recent changes * Improving consistency of tables (#96) --------- Co-authored-by: Neil Dewhurst <[email protected]> Co-authored-by: Michael Webb <[email protected]> Co-authored-by: Darrell Warde <[email protected]>
1 parent 4ceb2f7 commit 2b953c5

File tree

2 files changed

+41
-42
lines changed

2 files changed

+41
-42
lines changed

modules/ROOT/pages/authentication-and-authorization/impersonation-and-user-switching.adoc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Here the user to impersonate is taken from a HTTP header `User`:
1515
[.tabbed-example]
1616
====
1717
18-
[.include-with-Typescript]
18+
[.include-with-JavaScript]
1919
=====
20-
[source, typescript, indent=0]
20+
[source, javascript, indent=0]
2121
----
2222
import { ApolloServer } from "@apollo/server";
2323
import { startStandaloneServer } from "@apollo/server/standalone";
24-
import { Neo4jGraphQL, Neo4jGraphQLContext } from "@neo4j/graphql";
24+
import { Neo4jGraphQL } from "@neo4j/graphql";
2525
import neo4j from "neo4j-driver";
2626
2727
const typeDefs = `#graphql
@@ -42,7 +42,7 @@ const neo4jGraphql = new Neo4jGraphQL({
4242
4343
const schema = await neo4jGraphql.getSchema();
4444
45-
const server = new ApolloServer<Neo4jGraphQLContext>({
45+
const server = new ApolloServer({
4646
schema,
4747
});
4848
@@ -59,13 +59,13 @@ console.log(`🚀 Server ready at: ${url}`);
5959
----
6060
=====
6161
62-
[.include-with-JavaScript]
62+
[.include-with-Typescript]
6363
=====
64-
[source, javascript, indent=0]
64+
[source, typescript, indent=0]
6565
----
6666
import { ApolloServer } from "@apollo/server";
6767
import { startStandaloneServer } from "@apollo/server/standalone";
68-
import { Neo4jGraphQL } from "@neo4j/graphql";
68+
import { Neo4jGraphQL, Neo4jGraphQLContext } from "@neo4j/graphql";
6969
import neo4j from "neo4j-driver";
7070
7171
const typeDefs = `#graphql
@@ -86,7 +86,7 @@ const neo4jGraphql = new Neo4jGraphQL({
8686
8787
const schema = await neo4jGraphql.getSchema();
8888
89-
const server = new ApolloServer({
89+
const server = new ApolloServer<Neo4jGraphQLContext>({
9090
schema,
9191
});
9292
@@ -113,13 +113,13 @@ An example of configuring user switching on a per request basis can be found in
113113
[.tabbed-example]
114114
====
115115
116-
[.include-with-TypeScript]
116+
[.include-with-JavaScript]
117117
=====
118-
[source, typescript, indent=0]
118+
[source, javascript, indent=0]
119119
----
120120
import { ApolloServer } from "@apollo/server";
121121
import { startStandaloneServer } from "@apollo/server/standalone";
122-
import { Neo4jGraphQL, Neo4jGraphQLContext } from "@neo4j/graphql";
122+
import { Neo4jGraphQL } from "@neo4j/graphql";
123123
import neo4j from "neo4j-driver";
124124
125125
const typeDefs = `#graphql
@@ -140,7 +140,7 @@ const neo4jGraphql = new Neo4jGraphQL({
140140
141141
const schema = await neo4jGraphql.getSchema();
142142
143-
const server = new ApolloServer<Neo4jGraphQLContext>({
143+
const server = new ApolloServer({
144144
schema,
145145
});
146146
@@ -157,13 +157,13 @@ console.log(`🚀 Server ready at: ${url}`);
157157
----
158158
=====
159159
160-
[.include-with-JavaScript]
160+
[.include-with-TypeScript]
161161
=====
162-
[source, javascript, indent=0]
162+
[source, typescript, indent=0]
163163
----
164164
import { ApolloServer } from "@apollo/server";
165165
import { startStandaloneServer } from "@apollo/server/standalone";
166-
import { Neo4jGraphQL } from "@neo4j/graphql";
166+
import { Neo4jGraphQL, Neo4jGraphQLContext } from "@neo4j/graphql";
167167
import neo4j from "neo4j-driver";
168168
169169
const typeDefs = `#graphql
@@ -184,7 +184,7 @@ const neo4jGraphql = new Neo4jGraphQL({
184184
185185
const schema = await neo4jGraphql.getSchema();
186186
187-
const server = new ApolloServer({
187+
const server = new ApolloServer<Neo4jGraphQLContext>({
188188
schema,
189189
});
190190

modules/ROOT/pages/integrations/apollo-federation.adoc

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,31 @@ This how-to guide sets up the project using ES Modules, which allows the usage o
6868
[.tabbed-example]
6969
====
7070
71+
[.include-with-JavaScript]
72+
=====
73+
74+
. Create a `src` directory with an empty `index.js` file to contain the entrypoint to your code:
75+
+
76+
[source, bash]
77+
----
78+
mkdir src
79+
touch src/index.js
80+
----
81+
+
82+
. Replace the default `scripts` entry in your `package.json` file with the following:
83+
+
84+
[source, json]
85+
----
86+
{
87+
// ...etc.
88+
"scripts": {
89+
"start": "node index.js"
90+
}
91+
// other dependencies
92+
}
93+
----
94+
=====
95+
7196
[.include-with-Typescript]
7297
=====
7398

@@ -126,32 +151,6 @@ For more information on the available options, see the https://www.typescriptlan
126151
}
127152
----
128153
=====
129-
130-
[.include-with-JavaScript]
131-
=====
132-
133-
. Create a `src` directory with an empty `index.js` file to contain the entrypoint to your code:
134-
+
135-
[source, bash]
136-
----
137-
mkdir src
138-
touch src/index.js
139-
----
140-
+
141-
. Replace the default `scripts` entry in your `package.json` file with the following:
142-
+
143-
[source, json]
144-
----
145-
{
146-
// ...etc.
147-
"scripts": {
148-
"start": "node index.js"
149-
}
150-
// other dependencies
151-
}
152-
----
153-
=====
154-
155154
====
156155

157156
[start=4]

0 commit comments

Comments
 (0)