Skip to content

Commit

Permalink
Updated docs to reference support for neptune analytics and updated C…
Browse files Browse the repository at this point in the history
…DK documentation to list the steps to modify the file more explicitly. (#45)
  • Loading branch information
andreachild authored Nov 23, 2024
1 parent bc4fce0 commit 972ec89
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)*

Expand Down
16 changes: 14 additions & 2 deletions doc/cdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<br>
The file looks like this:
The original file looks like this:
```js
#!/usr/bin/env node

Expand All @@ -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

Expand Down

0 comments on commit 972ec89

Please sign in to comment.