question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Field naming starting with reserved keywords breaks updates

See original GitHub issue

When in a table there is a column that starts with a reserved keyword, for example nullSomeColumnName or trueSomeColumnName, if you try to create an update with an on_conflict and columns, the update will fail like:

extensions": {
        "path": "$.selectionSet.insert_some_table.args.on_conflict.update_columns[indexOfColumnThatStartsWithNull]",
        "code": "validation-failed"
      },
      "message": "null value found for non-nullable type: some_table_update_column!"

If the field starts with true or false the error is almost the same but the message is related to value must be an enum.

It seems like the engine is trying to parse the column names somehow.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
sordinacommented, Feb 25, 2020

Parser changes merged. Referencing commit in engine:

source-repository-package
  type: git
  location: https://github.com/hasura/graphql-parser-hs.git
  tag: 1380495a7b3269b70a7ab3081d745a5f54171a9c
1reaction
sordinacommented, Feb 24, 2020

@rstpv I’ve resolved the issue in the parser and am now testing integration with graphql-engine. Should have a candidate fix ready shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reserved Keywords (Transact-SQL) - Microsoft Learn
Transact-SQL reserved keywords can be used as identifiers or names of databases or database objects, such as tables, columns, views, and so on....
Read more >
Reserved Keywords - Real Python
The Python language reserves a small set of keywords that designate special language functionality. No object can have the same name as a ......
Read more >
How can this code use reserved keywords as field names?
My IDE decompiled some third party libraries and I'm curious how this can be valid - never saw before keywords can be used...
Read more >
Problem names and reserved words in Access - Allen Browne
Num Bad Name Reason identified 1 _Evaluate Form method 2 _Name Form method; Form Section method 3 A_ADD Access constant (old)
Read more >
Reserved Keywords in Formulas - Salesforce Help
In CRM Analytics, Data Prep has reserved keywords that need special handling when manually writing formulas. Use double quotes " when referencing dataset......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found