mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
8c05efb6d9
The materialized views cannot be mutated, so this commit removes the option to run mutation on the materialized views via graphql endpoint. Before this, users could have tried running mutation for the materialized views using the graphql endpoint (or from HGE console), which would have resulted in the following error: ``` JSON { "errors": [ { "extensions": { "internal": { "statement": "WITH \"articles_mat_view__mutation_result_alias\" AS (DELETE FROM \"public\".\"articles_mat_view\" WHERE (('true') AND (((((\"public\".\"articles_mat_view\".\"id\") = (('20155721-961c-4d8b-a5c4-873ed62c7a61')::uuid)) AND ('true')) AND ('true')) AND ('true'))) RETURNING * ), \"articles_mat_view__all_columns_alias\" AS (SELECT \"id\" , \"author_id\" , \"content\" , \"test_col\" , \"test_col2\" FROM \"articles_mat_view__mutation_result_alias\" ) SELECT json_build_object('affected_rows', (SELECT COUNT(*) FROM \"articles_mat_view__all_columns_alias\" ) ) ", "prepared": false, "error": { "exec_status": "FatalError", "hint": null, "message": "cannot change materialized view \"articles_mat_view\"", "status_code": "42809", "description": null }, "arguments": [] }, "path": "$", "code": "unexpected" }, "message": "database query error" } ] } ``` So, we don't want to generate the mutation fields for the materialized views altogether. https://github.com/hasura/graphql-engine-mono/pull/2226 GitOrigin-RevId: 4ef441764035a8039e1c780d454569ee1f2febc3 |
||
---|---|---|
.. | ||
setup.yaml | ||
teardown.yaml | ||
track_function_table_same_name.yaml | ||
track_non_graphql_compliant_table.yaml | ||
track_table_function_same_name.yaml | ||
track_untrack_materialized_view.yaml | ||
track_untrack_table_as_not_admin_error.yaml | ||
track_untrack_table_deps.yaml | ||
track_untrack_table_non_public_schema.yaml | ||
track_untrack_table.yaml |