mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
fix remote schema permissions with null default value
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6414 GitOrigin-RevId: 1b902b1ac7c541bdd79f933ef6fc008f875b517a
This commit is contained in:
parent
67087043c9
commit
e91cba835b
@ -512,6 +512,10 @@ const serialiseArgs = (args: ArgTreeType, argDef: GraphQLInputField) => {
|
||||
let res = '{';
|
||||
const { children } = getChildArguments(argDef);
|
||||
|
||||
if (args === null) {
|
||||
return 'null';
|
||||
}
|
||||
|
||||
Object.entries(args).forEach(([key, value]) => {
|
||||
if (isEmpty(value) || isEmpty(children)) {
|
||||
return;
|
||||
@ -672,7 +676,7 @@ const getSDLField = (
|
||||
valueStr = `${arg.name} : ${arg.type.inspect()}`;
|
||||
|
||||
// add default value after type definition if it exists
|
||||
if (arg.defaultValue) {
|
||||
if (arg.defaultValue !== undefined) {
|
||||
const defaultValue = formatArg({
|
||||
arg,
|
||||
argName: arg.defaultValue,
|
||||
|
Loading…
Reference in New Issue
Block a user