File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
codegenerator/cli/templates/static/codegen/src Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -164,8 +164,24 @@ module Hasura = {
164
164
165
165
let secret = envSafe -> EnvSafe .get ("HASURA_GRAPHQL_ADMIN_SECRET" , S .string , ~devFallback = "testing" )
166
166
167
- let aggregateEntities =
168
- envSafe -> EnvSafe .get ("ENVIO_HASURA_PUBLIC_AGGREGATE" , S .array (S .string ), ~fallback = [])
167
+ let aggregateEntities = envSafe -> EnvSafe .get (
168
+ "ENVIO_HASURA_PUBLIC_AGGREGATE" ,
169
+ S .union ([
170
+ S .array (S .string ),
171
+ // Temporary workaround: Hosted Service can't use commas in env vars for multiple entities.
172
+ // Will be removed once comma support is added — don't rely on this.
173
+ S .string -> S .transform (s => {
174
+ parser : string =>
175
+ switch string -> Js .String2 .split ("&" ) {
176
+ | []
177
+ | [_ ] =>
178
+ s .fail (` Provide an array of entities in the JSON format.` )
179
+ | entities => entities
180
+ },
181
+ }),
182
+ ]),
183
+ ~fallback = [],
184
+ )
169
185
}
170
186
171
187
module Configurable = {
You can’t perform that action at this time.
0 commit comments