Skip to content

Commit 70ec2db

Browse files
rsill-neo4jmjfwebb
andauthored
Apply suggestions from code review
Co-authored-by: Michael Webb <[email protected]>
1 parent e184522 commit 70ec2db

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modules/ROOT/pages/getting-started/graphql-aura.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Even with just field suggestions enabled, it is possible for a malicious actor t
2626
=== Type definitions
2727

2828
Paste these **Type definitions**:
29-
+
3029
[source, graphql, indent=0]
3130
----
3231
type Product @node {
@@ -108,28 +107,28 @@ When the status for the GraphQL API is **Ready** you can send GraphQL requests t
108107

109108
[source, bash, indent=0]
110109
----
111-
curl --location <YOUR_GRAPHQL_API_URL> --header 'Content-Type: application/json' --header 'x-api-key: <YOUR_API_KEY>' --data '<YOUR_GRAPHQL_QUERY>'
110+
curl --location <YOUR_GRAPHQL_API_URL> --header 'Content-Type: application/json' --header 'x-api-key: <YOUR_API_KEY>' --data '{ "query": "<YOUR_GRAPHQL_QUERY>" }'
112111
----
113112

114113
On the command line, execute:
115114

116115
[source, bash, indent=0]
117116
----
118-
curl --location <YOUR_GRAPHQL_API_URL> --header 'Content-Type: application/json' --header 'x-api-key: <YOUR_API_KEY>' --data '{ "query": "mutation { createProducts( input: [ { productName: \"New Product\" category: { create: [{ node: { categoryName: \"New Category\" } }] } } ] ) { products { productName category { categoryName } } }}" }'
117+
curl --location <YOUR_GRAPHQL_API_URL> --header 'Content-Type: application/json' --header 'x-api-key: <YOUR_API_KEY>' --data '{ "query": "mutation { createProducts( input: [ { productName: \"New Product\" category: { create: [ { node: { categoryName: \"New Category\" } } ] } } ] ) { products { productName category { categoryName } } } }" }'
119118
----
120119

121120
Verify by querying the data you just added:
122121

123122
[source, bash, indent=0]
124123
----
125-
curl --location https://4ea54ef6-graphql.production-orch-0969.neo4j.io/graphql --header 'Content-Type: application/json' --header 'x-api-key: dG0K4gBjDx4XEHpP0Ca7rKzToSUE3VcU' --data '{ "query": "query { products { productName category { categoryName } }}" }'
124+
curl --location <YOUR_GRAPHQL_API_URL> --header 'Content-Type: application/json' --header 'x-api-key: <YOUR_API_KEY>' --data '{ "query": "query { products { productName category { categoryName } } }" }'
126125
----
127126

128127
You should see this:
129128

130129
[source, bash, indent=0]
131130
----
132-
{"data":{"products":[{"productName":"New Product","category":[{"categoryName":"New Category"}]}]}}
131+
{ "data": { "products": [ { "productName": "New Product", "category": [{ "categoryName": "New Category" }] } ] } }
133132
----
134133

135134

0 commit comments

Comments
 (0)