mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 14:27:59 +03:00
cli: remove the unnecessary empty lines in actions.graphql generated by metadata export command
closes https://github.com/hasura/graphql-engine/issues/5338 GitOrigin-RevId: 83bd8492beb9f52c761d5857ca369425c69691a4
This commit is contained in:
parent
dc950eda6a
commit
8bfc56b7c4
@ -8,7 +8,7 @@
|
||||
- console: allow tracking of custom SQL functions having composite type (rowtype) input arguments
|
||||
- console: allow input object presets in remote schema permissions
|
||||
- cli: add interactive prompt to get input when `--database-name` flag is missing
|
||||
|
||||
- cli: fix metadata export to avoid unnecessary empty lines in actions.graphql (#5338)
|
||||
|
||||
## v2.0.0-beta.1
|
||||
|
||||
|
@ -31,23 +31,23 @@ const handlePayload = (payload) => {
|
||||
a.definition.type,
|
||||
a.definition.arguments,
|
||||
a.definition.output_type,
|
||||
)}\n`;
|
||||
)}`;
|
||||
});
|
||||
} catch (e) {
|
||||
actionSdlError = e;
|
||||
}
|
||||
}
|
||||
|
||||
let sdl = `${actionSdl}`;
|
||||
if (types) {
|
||||
try {
|
||||
typesSdl = getTypesSdl(types);
|
||||
sdl = `${sdl}${typesSdl}`;
|
||||
} catch (e) {
|
||||
typesSdlError = e;
|
||||
}
|
||||
}
|
||||
|
||||
let sdl = `${actionSdl}\n\n${typesSdl}`;
|
||||
|
||||
if (toDeriveOperation) {
|
||||
try {
|
||||
const derivation = deriveAction(
|
||||
@ -62,7 +62,7 @@ const handlePayload = (payload) => {
|
||||
derivation.action.output_type,
|
||||
);
|
||||
const derivedTypesSdl = getTypesSdl(derivation.types);
|
||||
sdl = `${derivedActionSdl}\n\n${derivedTypesSdl}\n\n${sdl}`;
|
||||
sdl = `${derivedActionSdl}${derivedTypesSdl}${sdl}`;
|
||||
} catch (e) {
|
||||
deriveActionError = e;
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user