Skip to content

Commit

Permalink
Fix unexpected breaking change in types
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Feb 11, 2025
1 parent 5f013f2 commit b5c05c4
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/slimy-ants-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-mesh/types': patch
---

Export again accidentially removed RedisConfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/dist/directives.js b/dist/directives.js
index bada42374b58093afec2d7290a82e1971bd8d85a..6ff572c1342cb501428614b89e518f1a3e9920de 100644
--- a/dist/directives.js
+++ b/dist/directives.js
@@ -1,3 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.DIRECTIVES = "\n directive @md on OBJECT\n directive @withAdditionalProperties on OBJECT\n";
+exports.DIRECTIVES =
+ "\n directive @md on OBJECT | UNION\n directive @withAdditionalProperties on OBJECT | UNION\n";
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"typecheck": "yarn generate-config-schema && tsc -p tsconfig.json --noEmit"
},
"devDependencies": {
"@ardatan/graphql-to-config-schema": "0.1.25",
"@ardatan/graphql-to-config-schema": "patch:@ardatan/graphql-to-config-schema@npm%3A0.1.25#~/.yarn/patches/@ardatan-graphql-to-config-schema-npm-0.1.25-f8c48d384e.patch",
"@babel/core": "7.26.8",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-explicit-resource-management": "7.25.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/redis/yaml-config.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type Cache {
redis: RedisConfig
}

union RedisConfig = RedisConfigSentinel | RedisConfigSingle
union RedisConfig @md = RedisConfigSentinel | RedisConfigSingle

type RedisConfigSentinel @md {
"""
Expand Down
3 changes: 2 additions & 1 deletion packages/legacy/types/src/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
"family": {
"type": "string"
}
}
},
"required": ["host", "port"]
},
"RedisConfigSingle": {
"additionalProperties": false,
Expand Down
4 changes: 2 additions & 2 deletions packages/legacy/types/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1858,8 +1858,8 @@ export interface RedisConfigSentinel {
lazyConnect?: boolean;
}
export interface RedisSentinelConfig {
host?: string;
port?: string;
host: string;
port: string;
family?: string;
}
export interface RedisConfigSingle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* `name` (type: `String`, required) - identifies a group of Redis instances composed of a master and one or more slaves
* `sentinelPassword` (type: `String`) - (optional) password for Sentinel instances.
* `sentinels` (type: `Array of Object`, required) - A list of sentinels to connect to. The list does not need to enumerate all your sentinel instances, but a few so that if one is down the client will try the next one.:
* `host` (type: `String`)
* `port` (type: `String`)
* `host` (type: `String`, required)
* `port` (type: `String`, required)
* `family` (type: `String`)
* `role` (type: `String (master | slave)`) - (optional) with a value of slave will return a random slave from the Sentinel group.
* `enableTLSForSentinelMode` (type: `Boolean`) - (optional) set to true if connecting to sentinel instances that are encrypted
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

* `host` (type: `String`)
* `port` (type: `String`)
* `host` (type: `String`, required)
* `port` (type: `String`, required)
* `family` (type: `String`)

0 comments on commit b5c05c4

Please sign in to comment.