Skip to content

Commit

Permalink
Merge pull request #42 from hasura/lyndon/document-config-format
Browse files Browse the repository at this point in the history
Documenting config format
  • Loading branch information
sordina authored Oct 11, 2023
2 parents 353c5bf + 4649492 commit 22c9734
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,31 @@ deno run --allow-sys --allow-run --allow-net --allow-read --allow-write --allow-
* (Optionally) Add a test-suite to your functions. See [Deno Testing Basics](https://docs.deno.com/runtime/manual/basics/testing).


## Config Format

The configuration object has the following properties:

```
functions (string): Location of your functions entrypoint (default: ./functions/index.ts)
vendor (string): Location of dependencies vendor folder (optional)
preVendor (boolean): Perform vendoring prior to inference in a sub-process (default: false)
schemaMode (string): INFER the schema from your functions, or READ it from a file.
schemaLocation (string): Location of your schema file. schemaMode=READ reads the file, schemaMode=INFER writes the file (optional)
```

NOTE: When deploying the connector with the `connector create` command your config is currently replaced with:

```
{
"functions": "/functions/index.ts",
"vendor": "/functions/vendor",
"schemaMode": "READ",
"schemaLocation": "/functions/schema.json"
}
```

This means that your functions volume will have to be mounted to `/functions`.

## Deployment for Hasura Users

You will need:
Expand Down
12 changes: 3 additions & 9 deletions src/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,12 @@ export const CAPABILITIES_RESPONSE: sdk.CapabilitiesResponse = {
versions: "^0.1.0",
capabilities: {
query: { },
mutations: { },
mutations: {
returning: {}
},
},
};

export const EMPTY_SCHEMA = {
collections: [],
functions: [],
procedures: [],
object_types: {},
scalar_types: {},
};

type Payload<X> = {
function: string,
args: Struct<X>
Expand Down

0 comments on commit 22c9734

Please sign in to comment.