Skip to content

Commit dfeb00a

Browse files
committed
renamed the tutorial .adoc file, removed out of scope ideas
1 parent 5eae1aa commit dfeb00a

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* *How-To*
5757
5858
* xref:driver-configuration.adoc[]
59-
* xref:northwind-api.adoc[]
59+
* xref:graphql-modeling.adoc[]
6060
6161
* *Products*
6262

modules/ROOT/pages/northwind-api.adoc renamed to modules/ROOT/pages/graphql-modeling.adoc

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ This Cypher query deletes all data in your database.
2929
.. In Aura, select **Learning**, then **Beginner** under **Getting started**.
3030
.. Select the **Learn the basics** tile and scroll to page 4/11 in the left side menu.
3131
.. Trigger the import with **Get the Northwind datset** and then **Run import** on the right hand side.
32-
//. The code examples in xref:#_use_the_api[] are in JavaScript.
33-
// Well, there are no examples yet.
3432

3533
== Goal
3634

@@ -157,11 +155,9 @@ The following mutation creates a new customer by the name of "Jane Doe":
157155
----
158156
mutation {
159157
createCustomers(
160-
input: [
161-
{
162-
contactName: "Jane Doe"
163-
}
164-
]
158+
input: [{
159+
contactName: "Jane Doe"
160+
}]
165161
) {
166162
customers {
167163
contactName
@@ -172,10 +168,14 @@ mutation {
172168

173169
To make it generic, you can use a link:https://graphql.org/learn/queries/#variables[GraphQL variable] to set the contactName dynamically:
174170

175-
[source, javascript, indent=0]
171+
[source, graphql, indent=0]
176172
----
177173
mutation CreateCustomer($contactName: String!) {
178-
createCustomers(input: [{ contactName: $contactName }]) {
174+
createCustomers(
175+
input: [{
176+
contactName: $contactName
177+
}]
178+
) {
179179
customers {
180180
contactName
181181
customerID
@@ -213,12 +213,7 @@ mutation {
213213
----
214214

215215
To place an order, the customer and product information must already be known or collected.
216-
A shopping basket can be implemented as follows:
217-
218-
[source, javascript, indent=0]
219-
----
220-
// JavaScript example
221-
----
216+
A shopping basket on the client side typically processes and displays this information.
222217

223218

224219
=== Calculate prices for orders
@@ -278,8 +273,6 @@ The result looks like this:
278273

279274
The product of `quantity` and `unitPrice` is the total cost, which in this case is 116.25.
280275

281-
// maybe add another JavaScript example here, that accesses the JSON response and actually calculates the amount. This could also be made generic, so that it is not reliant on the orderID used here.
282-
283276
Note that there is no `discount` field on the `ORDERS` relationship and it is unclear how taxation works in this scenario.
284277

285278

0 commit comments

Comments
 (0)