Skip to content

Commit

Permalink
revert: Restrictions on flow.status via Hasura permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed May 28, 2024
1 parent 7604ff6 commit 37bf745
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions api.planx.uk/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -22,7 +22,7 @@ export interface FlowData {

// Get a flow's data (unflattened, without external portal nodes)
const getFlowData = async (id: string): Promise<FlowData> => {
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) {
Expand Down Expand Up @@ -146,7 +146,7 @@ interface PublishedFlows {
const getMostRecentPublishedFlow = async (
id: string,
): Promise<Flow["data"] | undefined> => {
const { flow } = await $api.client.request<PublishedFlows>(
const { flow } = await $public.client.request<PublishedFlows>(
gql`
query GetMostRecentPublishedFlow($id: uuid!) {
flow: flows_by_pk(id: $id) {
Expand Down
4 changes: 1 addition & 3 deletions hasura.planx.uk/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,7 @@
- version
computed_fields:
- data_merged
filter:
status:
_eq: online
filter: {}
allow_aggregations: true
- role: teamEditor
permission:
Expand Down

0 comments on commit 37bf745

Please sign in to comment.