From d1456b627ae38e1a3a13683f727930c0b7e31811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Tue, 28 May 2024 18:21:11 +0100 Subject: [PATCH] revert: Restrictions on flow.status via Hasura permissions --- api.planx.uk/helpers.ts | 6 +++--- hasura.planx.uk/metadata/tables.yaml | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/api.planx.uk/helpers.ts b/api.planx.uk/helpers.ts index 05242581c3..6bbcf5b71e 100644 --- a/api.planx.uk/helpers.ts +++ b/api.planx.uk/helpers.ts @@ -2,7 +2,7 @@ import { gql } from "graphql-request"; import { capitalize } from "lodash"; import { Flow, Node } from "./types"; import { ComponentType, FlowGraph } from "@opensystemslab/planx-core/types"; -import { $api, $public, getClient } from "./client"; +import { $public, getClient } from "./client"; export interface FlowData { slug: string; @@ -22,7 +22,7 @@ export interface FlowData { // Get a flow's data (unflattened, without external portal nodes) const getFlowData = async (id: string): Promise => { - const { flow } = await $api.client.request<{ flow: FlowData | null }>( + const { flow } = await $public.client.request<{ flow: FlowData | null }>( gql` query GetFlowData($id: uuid!) { flow: flows_by_pk(id: $id) { @@ -146,7 +146,7 @@ interface PublishedFlows { const getMostRecentPublishedFlow = async ( id: string, ): Promise => { - const { flow } = await $api.client.request( + const { flow } = await $public.client.request( gql` query GetMostRecentPublishedFlow($id: uuid!) { flow: flows_by_pk(id: $id) { diff --git a/hasura.planx.uk/metadata/tables.yaml b/hasura.planx.uk/metadata/tables.yaml index cc092977ef..cd5f0e6376 100644 --- a/hasura.planx.uk/metadata/tables.yaml +++ b/hasura.planx.uk/metadata/tables.yaml @@ -565,9 +565,7 @@ - version computed_fields: - data_merged - filter: - status: - _eq: online + filter: {} allow_aggregations: true - role: teamEditor permission: