From b91b49c226939842b1be1e04d930ab59781d5756 Mon Sep 17 00:00:00 2001 From: Tero Tikkanen Date: Wed, 23 Oct 2024 23:17:20 +0300 Subject: [PATCH] Simplify paths node content fetching --- components/paths/CategoryCard.tsx | 214 ++++++----------- .../paths/contentblocks/ActionListBlock.tsx | 47 ++-- .../contentblocks/CategoryPageHeaderBlock.tsx | 222 ++++++------------ queries/paths/get-paths-action-content.ts | 168 ------------- queries/paths/get-paths-actions.ts | 114 --------- queries/paths/get-paths-instance.ts | 2 +- queries/paths/get-paths-node.ts | 34 ++- queries/paths/get-paths-parameters.ts | 2 +- 8 files changed, 209 insertions(+), 594 deletions(-) delete mode 100644 queries/paths/get-paths-action-content.ts delete mode 100644 queries/paths/get-paths-actions.ts diff --git a/components/paths/CategoryCard.tsx b/components/paths/CategoryCard.tsx index df9ebec1..25127047 100644 --- a/components/paths/CategoryCard.tsx +++ b/components/paths/CategoryCard.tsx @@ -1,5 +1,3 @@ -import { useEffect } from 'react'; - import { beautifyValue } from 'common/data/format'; import { Link } from 'common/links'; import ActionParameters from 'components/paths/ActionParameters'; @@ -15,16 +13,12 @@ import styled, { useTheme } from 'styled-components'; import PopoverTip from '@/components/common/PopoverTip'; import { activeGoalVar, yearRangeVar } from '@/context/paths/cache'; -import { GET_PATHS_ACTION } from '@/queries/paths/get-paths-actions'; -import { - GET_NODE_CONTENT, - GET_NODE_INFO, -} from '@/queries/paths/get-paths-node'; +import { GET_NODE_CONTENT } from '@/queries/paths/get-paths-node'; import { getScopeLabel, getScopeTotal } from '@/utils/paths/emissions'; import { DimensionalMetric } from '@/utils/paths/metric'; import { getHttpHeaders } from '@/utils/paths/paths.utils'; import PathsActionNode from '@/utils/paths/PathsActionNode'; -import { NetworkStatus, useQuery, useReactiveVar } from '@apollo/client'; +import { useQuery, useReactiveVar } from '@apollo/client'; const GroupIdentifierHeader = styled.div` background-color: ${(props) => props.$color}; @@ -113,164 +107,100 @@ const IndicatorSparkline = (props) => { ); }; const PathsBasicNodeContent = (props) => { - const { categoryId, node, pathsInstance, onLoaded } = props; + const { categoryId, node, pathsInstance } = props; const yearRange = useReactiveVar(yearRangeVar); const activeGoal = useReactiveVar(activeGoalVar); // const t = useTranslations(); - const { data, loading, error, networkStatus } = useQuery(GET_NODE_CONTENT, { - fetchPolicy: 'no-cache', - variables: { node: node, goal: activeGoal?.id }, - notifyOnNetworkStatusChange: true, - context: { - uri: '/api/graphql-paths', - headers: getHttpHeaders({ instanceIdentifier: pathsInstance }), - }, - }); - - const refetching = networkStatus === NetworkStatus.refetch; - - useEffect(() => { - if (data) { - const nodeMetric = new DimensionalMetric(data.node.metricDim!); - const indirectEmissions = getScopeTotal( - nodeMetric, - 'indirect', - yearRange[1] - ); - const directEmissions = getScopeTotal(nodeMetric, 'direct', yearRange[1]); - const yearTotal = indirectEmissions + directEmissions; - onLoaded(categoryId, yearTotal || 0); - } - }, [activeGoal, data, yearRange]); + if (node.metricDim) { + const nodeMetric = new DimensionalMetric(node.metricDim!); - if (loading && !refetching) { - return ; - } - if (error) { - return
Error: {error.message}
; // Handle error appropriately - } - if (data) { - if (data.node.metricDim) { - const nodeMetric = new DimensionalMetric(data.node.metricDim!); - - const indirectEmissions = getScopeTotal( - nodeMetric, - 'indirect', - yearRange[1] - ); - const directEmissions = getScopeTotal(nodeMetric, 'direct', yearRange[1]); + const indirectEmissions = getScopeTotal( + nodeMetric, + 'indirect', + yearRange[1] + ); + const directEmissions = getScopeTotal(nodeMetric, 'direct', yearRange[1]); - const indirectEmissionsLabel = getScopeLabel(nodeMetric, 'indirect'); - const directEmissionsLabel = getScopeLabel(nodeMetric, 'direct'); + const indirectEmissionsLabel = getScopeLabel(nodeMetric, 'indirect'); + const directEmissionsLabel = getScopeLabel(nodeMetric, 'direct'); - /* + /* console.log('default config', defaultConfig); console.log('metric', nodeMetric); console.log('this year', thisYear); */ - // TODO: Just get any label for now + // TODO: Just get any label for now - const unit = nodeMetric.getUnit(); + const unit = nodeMetric.getUnit(); - return ( - -
- {directEmissions || indirectEmissions ? ( -
-
- {nodeMetric.getName()} ({yearRange[1]}) -
-

- {(directEmissions + indirectEmissions).toPrecision(3)} {unit} -

-
- ) : null} - {directEmissions ? ( -
- {directEmissionsLabel} -
- {directEmissions && directEmissions.toPrecision(3)} {unit} -
-
- ) : ( -
- )} - {indirectEmissions ? ( -
- {indirectEmissionsLabel} -
- {indirectEmissions.toPrecision(3)} {unit} -
-
- ) : ( -
- )} -
- - ); - } else { - return
{data.node.__typename} not supported
; - } + return ( + +
+ {directEmissions || indirectEmissions ? ( +
+
+ {nodeMetric.getName()} ({yearRange[1]}) +
+

+ {(directEmissions + indirectEmissions).toPrecision(3)} {unit} +

+
+ ) : null} + {directEmissions ? ( +
+ {directEmissionsLabel} +
+ {directEmissions && directEmissions.toPrecision(3)} {unit} +
+
+ ) : ( +
+ )} + {indirectEmissions ? ( +
+ {indirectEmissionsLabel} +
+ {indirectEmissions.toPrecision(3)} {unit} +
+
+ ) : ( +
+ )} +
+ + ); + } else { + return
{node.__typename} not supported
; } - return null; }; const PathsActionNodeContent = (props) => { const { categoryId, node, pathsInstance, onLoaded } = props; const yearRange = useReactiveVar(yearRangeVar); - const activeGoal = useReactiveVar(activeGoalVar); const t = useTranslations(); - const { data, loading, error, networkStatus } = useQuery(GET_PATHS_ACTION, { - fetchPolicy: 'no-cache', - variables: { action: node, goal: activeGoal?.id }, - notifyOnNetworkStatusChange: true, - context: { - uri: '/api/graphql-paths', - headers: getHttpHeaders({ instanceIdentifier: pathsInstance }), - }, - }); - - const refetching = networkStatus === NetworkStatus.refetch; - - useEffect(() => { - if (data) { - const pathsAction = new PathsActionNode(data.action); - const impact = pathsAction.getYearlyImpact(yearRange[1]) || 0; - onLoaded(categoryId, impact); - } - }, [activeGoal, data, yearRange]); - - if (loading && !refetching) { - return ; - } - if (error) { - return
Error: {error.message}
; // Handle error appropriately - } - if (data) { - const pathsAction = new PathsActionNode(data.action); - const impact = pathsAction.getYearlyImpact(yearRange[1]) || 0; - return ( - - {t('impact')} {yearRange[1]} -

- {yearRange ? beautifyValue(impact) : ---} - {pathsAction.getUnit()} -

- -
- ); - } - return null; + const pathsAction = new PathsActionNode(node); + const impact = pathsAction.getYearlyImpact(yearRange[1]) || 0; + return ( + + {t('impact')} {yearRange[1]} +

+ {yearRange ? beautifyValue(impact) : ---} + {pathsAction.getUnit()} +

+ +
+ ); }; const PathsNodeContent = (props) => { const { categoryId, node, paths, onLoaded } = props; - - const { data, loading, error } = useQuery(GET_NODE_INFO, { + const activeGoal = useReactiveVar(activeGoalVar); + const { data, loading, error, networkStatus } = useQuery(GET_NODE_CONTENT, { fetchPolicy: 'no-cache', - variables: { node: node }, + variables: { node: node, goal: activeGoal?.id }, + notifyOnNetworkStatusChange: true, context: { uri: '/api/graphql-paths', headers: getHttpHeaders({ instanceIdentifier: paths }), @@ -288,7 +218,7 @@ const PathsNodeContent = (props) => { return ( @@ -297,7 +227,7 @@ const PathsNodeContent = (props) => { return ( diff --git a/components/paths/contentblocks/ActionListBlock.tsx b/components/paths/contentblocks/ActionListBlock.tsx index e620fc72..fc72d1f4 100644 --- a/components/paths/contentblocks/ActionListBlock.tsx +++ b/components/paths/contentblocks/ActionListBlock.tsx @@ -121,6 +121,7 @@ const actionsWithCategory = ( actions: ActionCardFragment[], activeTab: string ) => { + if (!activeTab) return actions; return actions.filter((action) => action.categories.findIndex((cat) => cat.id === activeTab) ); @@ -142,30 +143,30 @@ const TabbedActionList = (props: TabbedActionListProps) => { return ( <> - - {actionGroups.map((groupCategory) => ( - setActiveTab(groupCategory.id)} - $isActive={groupCategory.id === activeTab} - > - -
{groupCategory.name}
-
-
- ))} -
- {activeTab !== 'null' && ( - + {actionGroups.length > 1 && ( + + {actionGroups.map((groupCategory) => ( + setActiveTab(groupCategory.id)} + $isActive={groupCategory.id === activeTab} + > + +
{groupCategory.name}
+
+
+ ))} +
)} + ); }; diff --git a/components/paths/contentblocks/CategoryPageHeaderBlock.tsx b/components/paths/contentblocks/CategoryPageHeaderBlock.tsx index 4ab47034..1410ef83 100644 --- a/components/paths/contentblocks/CategoryPageHeaderBlock.tsx +++ b/components/paths/contentblocks/CategoryPageHeaderBlock.tsx @@ -1,26 +1,20 @@ -import React, { useEffect } from 'react'; +import React from 'react'; import { CategoryTypePageLevelLayout } from 'common/__generated__/graphql'; import Breadcrumbs from 'components/common/Breadcrumbs'; import { CategoryPage } from 'components/common/CategoryPageStreamField'; import { usePaths } from 'context/paths/paths'; -import { usePlan } from 'context/plan'; -import { useTranslations } from 'next-intl'; import ContentLoader from 'react-content-loader'; import { Container } from 'reactstrap'; import styled, { useTheme } from 'styled-components'; import { activeGoalVar, yearRangeVar } from '@/context/paths/cache'; -import { GET_PATHS_ACTION } from '@/queries/paths/get-paths-actions'; -import { - GET_NODE_CONTENT, - GET_NODE_INFO, -} from '@/queries/paths/get-paths-node'; +import { GET_NODE_CONTENT } from '@/queries/paths/get-paths-node'; import { getScopeLabel, getScopeTotal } from '@/utils/paths/emissions'; import { DimensionalMetric } from '@/utils/paths/metric'; import { getHttpHeaders } from '@/utils/paths/paths.utils'; import PathsActionNode from '@/utils/paths/PathsActionNode'; -import { gql, NetworkStatus, useQuery, useReactiveVar } from '@apollo/client'; +import { gql, useQuery, useReactiveVar } from '@apollo/client'; export const GET_CATEGORY_ATTRIBUTE_TYPES = gql` query GetCategoryAttributeTypes($plan: ID!) { @@ -121,166 +115,111 @@ interface Props { const PathsBasicNodeContent = (props) => { const { categoryId, node, pathsInstance } = props; const yearRange = useReactiveVar(yearRangeVar); - const activeGoal = useReactiveVar(activeGoalVar); - // const t = useTranslations(); - //console.log(activeGoal); - const { data, loading, error, networkStatus } = useQuery(GET_NODE_CONTENT, { - fetchPolicy: 'no-cache', - variables: { node: node, goal: activeGoal?.id }, - notifyOnNetworkStatusChange: true, - context: { - uri: '/api/graphql-paths', - headers: getHttpHeaders({ instanceIdentifier: pathsInstance }), - }, - }); - const refetching = networkStatus === NetworkStatus.refetch; + if (node.metricDim) { + const nodeMetric = new DimensionalMetric(node.metricDim!); - if (loading && !refetching) { - return ; - } - if (error) { - return
Error: {error.message}
; // Handle error appropriately - } - if (data) { - //console.log('data', data); - if (data.node.metricDim) { - const nodeMetric = new DimensionalMetric(data.node.metricDim!); - - const indirectEmissions = getScopeTotal( - nodeMetric, - 'indirect', - yearRange[1] - ); - const directEmissions = getScopeTotal(nodeMetric, 'direct', yearRange[1]); + const indirectEmissions = getScopeTotal( + nodeMetric, + 'indirect', + yearRange[1] + ); + const directEmissions = getScopeTotal(nodeMetric, 'direct', yearRange[1]); - const indirectEmissionsLabel = getScopeLabel(nodeMetric, 'indirect'); - const directEmissionsLabel = getScopeLabel(nodeMetric, 'direct'); + const indirectEmissionsLabel = getScopeLabel(nodeMetric, 'indirect'); + const directEmissionsLabel = getScopeLabel(nodeMetric, 'direct'); - const unit = nodeMetric.getUnit(); + const unit = nodeMetric.getUnit(); - const hasEmissionGoals = false; - return ( - + const hasEmissionGoals = false; + return ( + +
+

+ {nodeMetric.getName()} ({yearRange[1]}) +

-

- {nodeMetric.getName()} ({yearRange[1]}) -

+ {directEmissionsLabel} +
+ {directEmissions ? directEmissions.toPrecision(3) : 'XXX'}{' '} + {unit} +
+
+ {indirectEmissions ? (
- {directEmissionsLabel} + {indirectEmissionsLabel}
- {directEmissions ? directEmissions.toPrecision(3) : 'XXX'}{' '} - {unit} + {indirectEmissions.toPrecision(3)} {unit}
- {indirectEmissions ? ( -
- {indirectEmissionsLabel} -
- {indirectEmissions.toPrecision(3)} {unit} -
-
- ) : ( -
- )} -
+ ) : ( +
+ )}
- {/* Hide targets now as we dont have them */} - {hasEmissionGoals ? ( +
+ {/* Hide targets now as we dont have them */} + {hasEmissionGoals ? ( +
+

Emissions target (2024)

-

Emissions target (2024)

-
- Direct emissions
XXX
-
-
- Indirect emissions
XXX
-
+ Direct emissions
XXX
+
+
+ Indirect emissions
XXX
- ) : ( -
- )} - - ); - } else { - return
{data.node.__typename} not supported
; - } +
+ ) : ( +
+ )} + + ); + } else { + return
{node.__typename} not supported
; } - return null; }; const PathsActionNodeContent = (props) => { const { categoryId, node, pathsInstance } = props; const yearRange = useReactiveVar(yearRangeVar); - const activeGoal = useReactiveVar(activeGoalVar); - const t = useTranslations(); - - const { data, loading, error, networkStatus } = useQuery(GET_PATHS_ACTION, { - fetchPolicy: 'no-cache', - variables: { action: node, goal: activeGoal?.id }, - notifyOnNetworkStatusChange: true, - context: { - uri: '/api/graphql-paths', - headers: getHttpHeaders({ instanceIdentifier: pathsInstance }), - }, - }); - - const refetching = networkStatus === NetworkStatus.refetch; - useEffect(() => { - if (data) { - const pathsAction = new PathsActionNode(data.action); - const impact = pathsAction.getYearlyImpact(yearRange[1]) || 0; - } - }, [activeGoal, data, yearRange]); + const pathsAction = new PathsActionNode(node); - if (loading && !refetching) { - return ; - } - if (error) { - return
Error: {error.message}
; // Handle error appropriately - } - if (data) { - const pathsAction = new PathsActionNode(data.action); - const impact = pathsAction.getYearlyImpact(yearRange[1]) || 0; - return ( - -
-

Emissions ({yearRangeVar[1]})

-
-
- Direct emissions
{impact}
-
-
- Indirect emissions
XXX
-
-
-
+ const impact = pathsAction.getYearlyImpact(yearRange[1]) || 0; + return ( + +
+

Impact ({yearRange[1]})

-

Emissions target

-
- Direct emissions
XXX
-
-
- Indirect emissions
XXX
-
+ Direct emissions +
+ {`${impact.toPrecision(3)} `} + +
- - ); - } - return null; +
+
+
+
+
+ ); }; const PathsNodeContent = (props) => { const { categoryId, node, paths } = props; + console.log('getting paths node content'); + const activeGoal = useReactiveVar(activeGoalVar); - const { data, loading, error } = useQuery(GET_NODE_INFO, { + const { data, loading, error, networkStatus } = useQuery(GET_NODE_CONTENT, { fetchPolicy: 'no-cache', - variables: { node: node }, + variables: { node: node, goal: activeGoal?.id }, + notifyOnNetworkStatusChange: true, context: { uri: '/api/graphql-paths', headers: getHttpHeaders({ instanceIdentifier: paths }), @@ -294,11 +233,12 @@ const PathsNodeContent = (props) => { return
Error: {error.message}
; // Handle error appropriately } if (data) { + console.log('paths node content', data); if (data.node.__typename === 'ActionNode') { return ( ); @@ -306,7 +246,7 @@ const PathsNodeContent = (props) => { return ( ); @@ -317,14 +257,8 @@ const PathsNodeContent = (props) => { function CategoryPageHeaderBlock(props: Props) { const { title, identifier, lead, level, pathsNodeId } = props; - const plan = usePlan(); - const paths = usePaths(); - const theme = useTheme(); - const t = useTranslations(); - const hasPaths = paths?.instance.id; - const showLevel = - level && !theme.settings.categories.categoryPageHideCategoryLabel; + const paths = usePaths(); return ( diff --git a/queries/paths/get-paths-action-content.ts b/queries/paths/get-paths-action-content.ts deleted file mode 100644 index a41188fc..00000000 --- a/queries/paths/get-paths-action-content.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { gql } from '@apollo/client'; - -import { ACTION_PARAMETER_FRAGMENT } from './get-paths-actions'; - -const DIMENSIONAL_METRIC_FRAGMENT = gql` - fragment DimensionalMetric on DimensionalMetricType { - id - name - dimensions { - id - label - originalId - helpText - categories { - id - originalId - label - color - order - group - } - groups { - id - originalId - label - color - order - } - } - goals { - categories - groups - values { - year - value - isInterpolated - } - } - unit { - htmlShort - short - } - stackable - normalizedBy { - id - name - } - forecastFrom - years - values - } -`; - -const DIMENSIONAL_FLOW_FRAGMENT = gql` - fragment DimensionalPlot on DimensionalFlowType { - id - unit { - htmlLong - } - nodes { - id - label - color - } - sources - links { - year - sources - targets - values - absoluteSourceValues - } - } -`; - -const GET_ACTION_CONTENT = gql` - query GetActionContent($node: ID!, $goal: ID, $downstreamDepth: Int) { - action(id: $node) { - ...CausalGridNode - goal - description - dimensionalFlow { - ...DimensionalPlot - } - downstreamNodes(maxDepth: $downstreamDepth) { - ...CausalGridNode - } - decisionLevel - } - } - ${DIMENSIONAL_FLOW_FRAGMENT} - - fragment CausalGridNode on NodeInterface { - id - name - shortDescription - color - targetYearGoal - unit { - htmlShort - } - inputNodes { - id - } - outputNodes { - id - } - ... on ActionNode { - group { - id - name - color - } - } - impactMetric(goalId: $goal) { - name - id - unit { - htmlShort - } - historicalValues { - year - value - } - forecastValues { - value - year - } - baselineForecastValues { - year - value - } - yearlyCumulativeUnit { - htmlShort - } - } - metricDim { - ...DimensionalMetric - } - quantity - parameters { - ...ActionParameter - } - metric(goalId: $goal) { - name - id - unit { - htmlShort - } - historicalValues { - year - value - } - forecastValues { - value - year - } - baselineForecastValues { - year - value - } - } - } - ${DIMENSIONAL_FLOW_FRAGMENT} - ${ACTION_PARAMETER_FRAGMENT} -`; - -export { GET_ACTION_CONTENT }; diff --git a/queries/paths/get-paths-actions.ts b/queries/paths/get-paths-actions.ts deleted file mode 100644 index e1d733ec..00000000 --- a/queries/paths/get-paths-actions.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { gql } from '@apollo/client'; - -const ACTION_PARAMETER_FRAGMENT = gql` - fragment ActionParameter on ParameterInterface { - __typename - id - label - description - nodeRelativeId - node { - id - } - isCustomized - isCustomizable - ... on NumberParameterType { - numberValue: value - numberDefaultValue: defaultValue - minValue - maxValue - unit { - htmlShort - } - step - } - ... on BoolParameterType { - boolValue: value - boolDefaultValue: defaultValue - } - ... on StringParameterType { - stringValue: value - stringDefaultValue: defaultValue - } - } -`; - -const PATHS_ACTION_FRAGMENT = gql` - fragment pathsActionFragment on ActionNode { - id - name - goal - shortDescription - color - decisionLevel - unit { - htmlShort - } - parameters { - ...ActionParameter - } - quantity - inputNodes { - id - } - outputNodes { - id - } - impactMetric(goalId: $goal) { - id - name - unit { - htmlShort - } - cumulativeForecastValue - yearlyCumulativeUnit { - htmlShort - } - historicalValues { - year - value - } - forecastValues { - value - year - } - } - group { - id - name - color - } - } - ${ACTION_PARAMETER_FRAGMENT} -`; - -const GET_PATHS_ACTION_LIST = gql` - query GetPathsActionList($goal: ID) { - instance { - id - actionGroups { - id - name - color - actions { - id - } - } - } - actions(onlyRoot: true) { - ...pathsActionFragment - } - } - ${PATHS_ACTION_FRAGMENT} -`; - -const GET_PATHS_ACTION = gql` - query GetPathsAction($action: ID!, $goal: ID) { - action(id: $action) { - ...pathsActionFragment - } - } - ${PATHS_ACTION_FRAGMENT} -`; - -export { ACTION_PARAMETER_FRAGMENT, GET_PATHS_ACTION, GET_PATHS_ACTION_LIST }; diff --git a/queries/paths/get-paths-instance.ts b/queries/paths/get-paths-instance.ts index 579b282e..f041639a 100644 --- a/queries/paths/get-paths-instance.ts +++ b/queries/paths/get-paths-instance.ts @@ -2,7 +2,7 @@ import { getClient } from '@/utils/apollo-rsc-client'; import { getHttpHeaders } from '@/utils/paths/paths.utils'; import { gql } from '@apollo/client'; -import { ACTION_PARAMETER_FRAGMENT } from './get-paths-actions'; +import { ACTION_PARAMETER_FRAGMENT } from './get-paths-node'; export const scenarioFragment = gql` fragment ScenarioFragment on ScenarioType { diff --git a/queries/paths/get-paths-node.ts b/queries/paths/get-paths-node.ts index b2bc9cfc..e9a66275 100644 --- a/queries/paths/get-paths-node.ts +++ b/queries/paths/get-paths-node.ts @@ -1,6 +1,37 @@ import { gql } from '@apollo/client'; -import { ACTION_PARAMETER_FRAGMENT } from './get-paths-actions'; +export const ACTION_PARAMETER_FRAGMENT = gql` + fragment ActionParameter on ParameterInterface { + __typename + id + label + description + nodeRelativeId + node { + id + } + isCustomized + isCustomizable + ... on NumberParameterType { + numberValue: value + numberDefaultValue: defaultValue + minValue + maxValue + unit { + htmlShort + } + step + } + ... on BoolParameterType { + boolValue: value + boolDefaultValue: defaultValue + } + ... on StringParameterType { + stringValue: value + stringDefaultValue: defaultValue + } + } +`; export const DIMENSIONAL_METRIC_FRAGMENT = gql` fragment DimensionalMetric on DimensionalMetricType { @@ -139,6 +170,7 @@ const GET_NODE_CONTENT = gql` const GET_NODE_INFO = gql` query GetNodeInfo($node: ID!) { node(id: $node) { + __typename id name } diff --git a/queries/paths/get-paths-parameters.ts b/queries/paths/get-paths-parameters.ts index 0c50174e..275b2beb 100644 --- a/queries/paths/get-paths-parameters.ts +++ b/queries/paths/get-paths-parameters.ts @@ -1,6 +1,6 @@ import { gql } from '@apollo/client'; -import { ACTION_PARAMETER_FRAGMENT } from './get-paths-actions'; +import { ACTION_PARAMETER_FRAGMENT } from './get-paths-node'; const GET_PARAMETERS = gql` query GetParameters {