creating migrations and setting up fragments

This commit is contained in:
Nikola Bjelo committed 2018-11-06 16:40:23 +01:00
1 parent 881a4754a0
commit 6d83c37bf1
3 files changed
+53 -11

No files matched your search

+25 -11
View File
@@ -1,31 +1,45 @@
import gql from 'graphql-tag';
import { formulaInfo, plotterInfo } from '../Fragments';
const EVENTS_FORMULAS = gql`
query Events_Formulas{
events_Formulas {
id
ownerId
isTemplate
name
...FormulaInfo
}
}
${formulaInfo}
`;
const EVENTS_PLOTTERS = gql`
query Events_Plotters{
events_Plotters {
id
ownerId
isTemplate
name
host
repo
moduleName
...PlotterInfo
}
}
${plotterInfo}
`;
const EVENTS_CREATEFORMULA = gql`
mutation Events_CreateEvent($event:events_EventInput!) {
events_CreateEvent(event: $event) {
...FormulaInfo
}
}
${formulaInfo}
`;
const EVENTS_CREATEPLOTTER = gql`
mutation Events_CreatePlotter($plotter:events_PlotterInput!) {
events_CreatePlotter(plotter: $plotter) {
...PlotterInfo
}
}
${plotterInfo}
`;
export default {
EVENTS_PLOTTERS,
EVENTS_FORMULAS,
EVENTS_CREATEFORMULA,
EVENTS_CREATEPLOTTER,
};
+6
View File
@@ -2,8 +2,14 @@ import {
eventMinimalInfo,
eventFullInfo,
} from './event';
import {
formulaInfo,
plotterInfo,
} from './options';
export {
eventMinimalInfo,
eventFullInfo,
formulaInfo,
plotterInfo,
};
+22
View File
@@ -0,0 +1,22 @@
import gql from 'graphql-tag';
export const plotterInfo = gql`
fragment PlotterInfo on events_Plotter {
id
ownerId
isTemplate
name
host
repo
moduleName
}
`;
export const formulaInfo = gql`
fragment FormulaInfo on events_Formula {
id
ownerId
isTemplate
name
}
`;