Skip to content

Commit 225aed6

Browse files
committed
updated: resource path info with doc link
1 parent e1bb66c commit 225aed6

File tree

1 file changed

+2
-2
lines changed
  • tutorial/markdown/nodejs/dataApi-appsync-tutorial

1 file changed

+2
-2
lines changed

tutorial/markdown/nodejs/dataApi-appsync-tutorial/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export function request(ctx) {
230230
// Build the HTTP request object for the Data API Query Service
231231
const requestObject = {
232232
method: 'POST',
233-
resourcePath: '/_p/query/query/service', // Data API SQL++ endpoint
233+
resourcePath: '/_p/query/query/service', // Data API SQL++ endpoint - see https://docs.couchbase.com/cloud/data-api-reference/index.html#tag/Query
234234
params: {
235235
headers: {
236236
'Accept': 'application/json',
@@ -274,7 +274,7 @@ export function response(ctx) {
274274
- `ctx.env` provides access to AppSync environment variables (credentials stored securely).
275275
- `ctx.arguments` gives you the GraphQL args: `city`.
276276
- `util.base64Encode` is an AppSync helper to encode credentials.
277-
- `resourcePath` is relative to the HTTP data source base URL.
277+
- `resourcePath` is the API endpoint path relative to your HTTP data source base URL. In this case, `/_p/query/query/service` is the [Data API Query Service endpoint](https://docs.couchbase.com/cloud/data-api-reference/index.html#tag/Query) for executing SQL++ queries.
278278
- `query_context` sets the default bucket/scope for SQL++.
279279
- Using positional parameters (`$1`) in the SQL++ query prevents SQL injection.
280280
- `parsedResult.results` is the array of documents returned by Data API.

0 commit comments

Comments
 (0)