From 14079028a621bd79e119ca925e1db0a6710194f0 Mon Sep 17 00:00:00 2001 From: JUDIT GRESKOVITS Date: Thu, 11 May 2017 13:10:52 +0100 Subject: [PATCH] Add gql file imports for fragments --- spikes/graphql/apollo-redux/src/containers/services/list.js | 2 ++ .../apollo-redux/src/graphql/DeploymentGroupInfo.gql | 5 +++++ .../graphql/apollo-redux/src/graphql/MetricsFragments.gql | 4 ---- spikes/graphql/apollo-redux/src/graphql/Services.gql | 6 +++--- 4 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 spikes/graphql/apollo-redux/src/graphql/DeploymentGroupInfo.gql delete mode 100644 spikes/graphql/apollo-redux/src/graphql/MetricsFragments.gql diff --git a/spikes/graphql/apollo-redux/src/containers/services/list.js b/spikes/graphql/apollo-redux/src/containers/services/list.js index e084783b..cd107481 100644 --- a/spikes/graphql/apollo-redux/src/containers/services/list.js +++ b/spikes/graphql/apollo-redux/src/containers/services/list.js @@ -3,6 +3,8 @@ import { graphql } from 'react-apollo'; import { Link } from 'react-router-dom'; import ServicesQuery from '../../graphql/Services.gql'; +console.log('ServicesQuery = ', ServicesQuery); + class ServiceList extends Component { render() { diff --git a/spikes/graphql/apollo-redux/src/graphql/DeploymentGroupInfo.gql b/spikes/graphql/apollo-redux/src/graphql/DeploymentGroupInfo.gql new file mode 100644 index 00000000..aedcca34 --- /dev/null +++ b/spikes/graphql/apollo-redux/src/graphql/DeploymentGroupInfo.gql @@ -0,0 +1,5 @@ +fragment DeploymentGroupInfo on DeploymentGroup { + uuid + name + id +} diff --git a/spikes/graphql/apollo-redux/src/graphql/MetricsFragments.gql b/spikes/graphql/apollo-redux/src/graphql/MetricsFragments.gql deleted file mode 100644 index 6e550525..00000000 --- a/spikes/graphql/apollo-redux/src/graphql/MetricsFragments.gql +++ /dev/null @@ -1,4 +0,0 @@ -fragment MetricsData { - timestamp - value -} diff --git a/spikes/graphql/apollo-redux/src/graphql/Services.gql b/spikes/graphql/apollo-redux/src/graphql/Services.gql index 3590923b..5dd3fb94 100644 --- a/spikes/graphql/apollo-redux/src/graphql/Services.gql +++ b/spikes/graphql/apollo-redux/src/graphql/Services.gql @@ -1,8 +1,8 @@ +#import "./DeploymentGroupInfo.gql" + query Services($deploymentGroupId: String!){ deploymentGroup(id: $deploymentGroupId) { - uuid - name - id + ...DeploymentGroupInfo services { uuid name