-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Version Information
Server Version: 2.3.0-beta.2 and beta.1
Environment
Core / sql server
What is the expected behaviour?
When configuring a column preset, that it would use that preset...
Keywords
column presets, sql server
What is the current behaviour?
When you set a preset either using a server variable like x-hasura-user-id or even a hard coded value, it does not work and produces an error.
The error in my case is a rejected insert because of a constraint violation b/c the column in question cannot insert a NULL value. This error occurs because the preset is not part of the insert script generated by the insert mutation.
I am not sure if perhaps the preset is supposed to be invoked after the insert? But whatever the case, my mutations are failing. Since the column preset disallows inserting into that column, it of course doesn't show up as a column I can provide a value for. And without an value for the insert either manually provided or via the preset then the query fails.
Error is : Integrity constraint violation. [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot insert the value NULL into column 'UserId', table 'answr.Messaging.ConversationMessage'; column does not allow nulls. INSERT fails.