From dbe4c75270a29656c046519911d5f4cc2a73b586 Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Thu, 27 Jul 2023 10:26:38 +1200 Subject: [PATCH] chore: Remove `backend_only` mutation default (#150) --- .../__snapshots__/hasura-client.test.js.snap | 6 ------ indexer-js-queue-handler/hasura-client.js | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/indexer-js-queue-handler/__snapshots__/hasura-client.test.js.snap b/indexer-js-queue-handler/__snapshots__/hasura-client.test.js.snap index b93fa6907..c5dccfbb8 100644 --- a/indexer-js-queue-handler/__snapshots__/hasura-client.test.js.snap +++ b/indexer-js-queue-handler/__snapshots__/hasura-client.test.js.snap @@ -24,7 +24,6 @@ exports[`HasuraClient adds the specified permissions for the specified roles/tab { "args": { "permission": { - "backend_only": true, "check": {}, "columns": "*", "computed_fields": [], @@ -42,7 +41,6 @@ exports[`HasuraClient adds the specified permissions for the specified roles/tab { "args": { "permission": { - "backend_only": true, "check": {}, "columns": "*", "computed_fields": [], @@ -60,7 +58,6 @@ exports[`HasuraClient adds the specified permissions for the specified roles/tab { "args": { "permission": { - "backend_only": true, "check": {}, "columns": "*", "computed_fields": [], @@ -96,7 +93,6 @@ exports[`HasuraClient adds the specified permissions for the specified roles/tab { "args": { "permission": { - "backend_only": true, "check": {}, "columns": "*", "computed_fields": [], @@ -114,7 +110,6 @@ exports[`HasuraClient adds the specified permissions for the specified roles/tab { "args": { "permission": { - "backend_only": true, "check": {}, "columns": "*", "computed_fields": [], @@ -132,7 +127,6 @@ exports[`HasuraClient adds the specified permissions for the specified roles/tab { "args": { "permission": { - "backend_only": true, "check": {}, "columns": "*", "computed_fields": [], diff --git a/indexer-js-queue-handler/hasura-client.js b/indexer-js-queue-handler/hasura-client.js index 395614aa1..318dc913d 100644 --- a/indexer-js-queue-handler/hasura-client.js +++ b/indexer-js-queue-handler/hasura-client.js @@ -230,9 +230,7 @@ export default class HasuraClient { check: {}, computed_fields: [], filter: {}, - ...(permission === "select" - ? { allow_aggregations: true } - : { backend_only: true }), + ...(permission === "select" && { allow_aggregations: true }) }, source: 'default' },