File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
modules/ROOT/pages/getting-started Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ Even with just field suggestions enabled, it is possible for a malicious actor t
2626=== Type definitions
2727
2828Paste these **Type definitions**:
29- +
3029[source, graphql, indent=0]
3130----
3231type 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
114113On 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
121120Verify 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
128127You 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
You can’t perform that action at this time.
0 commit comments