CatchTheTornado/askql

at should throw if the key is missing

mhagmajer opened this issue · 7 comments

ask {
    const marta = { firstName: 'Marta' }
    marta:at('firstName3')
}

returns null (empty) but an error was expected (playground with AskVM v. 1.2.0)

@czerwinskilukasz1 what's your opinion about this?

I'd really like not to have two empty values like in JavaScript

I'm fine with throwing as soon as we have hasKey: #400

hasKey is implemented, this is unblocked now.

I have created a pull request (https://github.com/xFAANG/askql/pull/523/files) with a unit test for this case. I will appreciate if someone could verify if the test is correct 😄
Next, I will work on changing the implementation of at to work as expected by the test

My pull request is ready for review 😃