diff --git a/README.md b/README.md index 4d08f5c..7075773 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # **Amazon Neptune utility for GraphQL™ schemas and resolvers** -The Amazon Neptune utility for GraphQL™ is a Node.js command-line utility to help with the creation and maintenance of a GraphQL API for the Amazon Neptune database. It is a no-code solution for a GraphQL resolver when GraphQL queries have a variable number of input parameters and return a variable number of nested fields. +The Amazon Neptune utility for GraphQL™ is a Node.js command-line utility to help with the creation and maintenance of a GraphQL API for the Amazon Neptune Database or Neptune Analytics graph. It is a no-code solution for a GraphQL resolver when GraphQL queries have a variable number of input parameters and return a variable number of nested fields. If you **start from a Neptune database with data**, the utility discover the graph database schema including nodes, edges, properties and edges cardinality, generate the GraphQL schema with the directives required to map the GraphQL types to the graph databases nodes and edges, and auto-generate the resolver code. We optimized the resolver code to reduce the latency of querying Amazon Neptune by returning only the data requested by the GraphQL query. *(Note: the utility works only for Property Graph databases, not RDF yet)* diff --git a/doc/cdk.md b/doc/cdk.md index b80e2d0..11404b5 100644 --- a/doc/cdk.md +++ b/doc/cdk.md @@ -48,7 +48,7 @@ Copy from the utility CDK output files from the *output* directory in the CDK ap Update the CDK test project, editing the file `bin/`*your-CDK-dir*`.js`
-The file looks like this: +The original file looks like this: ```js #!/usr/bin/env node @@ -69,7 +69,19 @@ new CdkStack(app, 'CdkStack', { }); ``` -Update the require and integrated the CDK class the utility created. Like this: +Update the require statement to reference the `AppSyncNeptuneStack` class from the `-cdk.js` file that was copied to the `lib` directory: + +```js +const { AppSyncNeptuneStack } = require('../lib/your-new-GraphQL-API-name-cdk'); +``` + +Update the stack instantiation to reference `AppSyncNeptuneStack` and change the stack name if desired: + +```js +new AppSyncNeptuneStack(app, 'your-CdkStack-name', { +``` + +The end result should look something like this: ```js #!/usr/bin/env node