Skip to content

Commit

Permalink
Merge pull request #76 from hasura/lyndon/prevendor-by-default-2
Browse files Browse the repository at this point in the history
Fixing implementation error for configuration defaults: `preVendor`
  • Loading branch information
sordina authored Nov 24, 2023
2 parents c6ce557 + 0d39dd0 commit d2b26ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ This changelog documents the changes between release versions.

Changes to be included in the next upcoming releaase.

## v0.17

Fixing issue with preVendor default.

PR: https://github.com/hasura/ndc-typescript-deno/pull/76

* Was only applying the default during user-interactive config flows

## v0.16

Prevendoring by default.
Expand Down
8 changes: 4 additions & 4 deletions src/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,17 @@ export const connector: sdk.Connector<Configuration, Configuration, State> = {

// TODO: https://github.com/hasura/ndc-typescript-deno/issues/27 Make this add in the defaults
update_configuration(configuration: Configuration): Promise<Configuration> {
return Promise.resolve(configuration);
},

validate_raw_configuration(configuration: Configuration): Promise<Configuration> {
const defaults = {
preVendor: true,
}
const response = { ...defaults, ...configuration }
return Promise.resolve(response);
},

validate_raw_configuration(configuration: Configuration): Promise<Configuration> {
return Promise.resolve(configuration);
},

get_schema(config: Configuration): Promise<sdk.SchemaResponse> {
const result = getInfo(config);
return Promise.resolve(result.schema);
Expand Down

0 comments on commit d2b26ba

Please sign in to comment.