mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 22:34:22 +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 = '{';
|
let res = '{';
|
||||||
const { children } = getChildArguments(argDef);
|
const { children } = getChildArguments(argDef);
|
||||||
|
|
||||||
|
if (args === null) {
|
||||||
|
return 'null';
|
||||||
|
}
|
||||||
|
|
||||||
Object.entries(args).forEach(([key, value]) => {
|
Object.entries(args).forEach(([key, value]) => {
|
||||||
if (isEmpty(value) || isEmpty(children)) {
|
if (isEmpty(value) || isEmpty(children)) {
|
||||||
return;
|
return;
|
||||||
@ -672,7 +676,7 @@ const getSDLField = (
|
|||||||
valueStr = `${arg.name} : ${arg.type.inspect()}`;
|
valueStr = `${arg.name} : ${arg.type.inspect()}`;
|
||||||
|
|
||||||
// add default value after type definition if it exists
|
// add default value after type definition if it exists
|
||||||
if (arg.defaultValue) {
|
if (arg.defaultValue !== undefined) {
|
||||||
const defaultValue = formatArg({
|
const defaultValue = formatArg({
|
||||||
arg,
|
arg,
|
||||||
argName: arg.defaultValue,
|
argName: arg.defaultValue,
|
||||||
|
Loading…
Reference in New Issue
Block a user