Bug: Shell/Dashboard missing default Select values

,

If I push a function to Fauna that uses a Select with a default value, that default value is missing in the shell and the dashboard:

(to be clear, the code is running properly in the faunadb with the default values intact. this only a display issue)

Text version of the test UDF:

CreateFunction({
  name: "defaultSelectValueTest",
  body: Query(
    Lambda([],
    Let({
    anObject: {
      a: {
        b: 'c'
      }
    },
    aMissingObjectValue: Select(['a', 'd'], Var('anObject'), 'd')
  },
    Var("aMissingObjectValue")
  ))
  )
})

You can see that the Select statement has a default value of d when I define the function.

And you can see that the default value is missing when the shell echoes back the function definition.

And it’s also missing from the function definition in the dashboard.

I found this bug because I tend to write large UDF functions using the js driver. And that means that when debugging the UDF, I can’t just paste my function code into the shell to test parts of it, since it’s no longer pure FQL. So the easiest way to test things is to copy the generated FQL code out of the function definition in the dashboard. That’s when I discovered the default Select values were missing, resulting in lots of lost time debugging an issue that wasn’t really an issue.

Hi @wallslide,

Thanks for reporting! We already have a ticket filed for this issue. We are already working for a resolution.

Thanks

Luigi

1 Like

Related topic:

1 Like