Forum Discussion
GraphQL update... mutation for Fabric SQL DB failing
- 13 days ago
Hi everyone,
After corresponding with MSFT support team I got some feedback and insights. Summing it up here hoping it might be useful to others some time. (This is the result as of Sept. 16th 2026)On the traces support found the following error message: "The target table 'dbo.table' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause."
- Addtional bit of info, that I stripped initially since I didn't think it could be the culprit 😯:
The table used has an update trigger (updates the updated_at column) - Fabric's GraphQL engine generates an UPDATE ... OUTPUT ... SQL statement (without an INTO clause)
This is done (my guess) to be able to return the requested columns without an additional select after the update (update does not return the updated rows directly) - SQL Server does not allow the above statement if there are enabled update triggers on the table. See: https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql?view=sql-server-ver17#triggers. This is due to timing/racing and consistency issues.
This leaves me with the following options:
- Do not use triggers:
- Delete or disable (or do not create) them for the mutations you want to use (UPDATE trigger in my case), but then you lose the action the the trigger performs
- If the action is necessary replace the trigger logic (possible in my case: Caller could just add a value for UPDATED_AT column, but would everyone do so?)
- Use a stored procedure to do the update with an INTO clause using a @table_variable
I'm not a big fan of either. I'd be very fond of the GraphQL implementation being changed to use the OUTPUT ... INTO ... solution suggested. It seems strange that a (imo) legitimate use of trigger is prohibited by an implementation detail of the GraphQL layer. I'm not very confident though this will land any time soon.
I want to thank Tharun from the support team for helping.
Best Martin - Addtional bit of info, that I stripped initially since I didn't think it could be the culprit 😯:
Hi everyone,
After corresponding with MSFT support team I got some feedback and insights. Summing it up here hoping it might be useful to others some time. (This is the result as of Sept. 16th 2026)
On the traces support found the following error message: "The target table 'dbo.table' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause."
- Addtional bit of info, that I stripped initially since I didn't think it could be the culprit 😯:
The table used has an update trigger (updates the updated_at column) - Fabric's GraphQL engine generates an UPDATE ... OUTPUT ... SQL statement (without an INTO clause)
This is done (my guess) to be able to return the requested columns without an additional select after the update (update does not return the updated rows directly) - SQL Server does not allow the above statement if there are enabled update triggers on the table. See: https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql?view=sql-server-ver17#triggers. This is due to timing/racing and consistency issues.
This leaves me with the following options:
- Do not use triggers:
- Delete or disable (or do not create) them for the mutations you want to use (UPDATE trigger in my case), but then you lose the action the the trigger performs
- If the action is necessary replace the trigger logic (possible in my case: Caller could just add a value for UPDATED_AT column, but would everyone do so?)
- Use a stored procedure to do the update with an INTO clause using a @table_variable
I'm not a big fan of either. I'd be very fond of the GraphQL implementation being changed to use the OUTPUT ... INTO ... solution suggested. It seems strange that a (imo) legitimate use of trigger is prohibited by an implementation detail of the GraphQL layer. I'm not very confident though this will land any time soon.
I want to thank Tharun from the support team for helping.
Best Martin
Ping v-achippa