Getting input types through indexes
This commit is contained in:
1 parent
93986e3d7d
commit
561948ede1
5 files changed
+15
-16
No files matched your search
@@ -3,7 +3,7 @@ import {
|
||||
GraphQLInputObjectType,
|
||||
GraphQLList,
|
||||
} from 'graphql';
|
||||
import InputSituationType from './Situation';
|
||||
import { SituationInputType } from './index';
|
||||
|
||||
const Type = new GraphQLInputObjectType({
|
||||
name: 'PhaseInput',
|
||||
@@ -11,7 +11,7 @@ const Type = new GraphQLInputObjectType({
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
code: { type: GraphQLString },
|
||||
situations: { type: new GraphQLList(InputSituationType) },
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@ import {
|
||||
GraphQLInputObjectType,
|
||||
GraphQLList,
|
||||
} from 'graphql';
|
||||
import InputConditionType from './Condition';
|
||||
import { ConditionInputType } from './index';
|
||||
|
||||
const Type = new GraphQLInputObjectType({
|
||||
name: 'SituationInput',
|
||||
description: 'Payload for situation input',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
conditions: { type: new GraphQLList(InputConditionType) },
|
||||
conditions: { type: new GraphQLList(ConditionInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ import {
|
||||
GraphQLInputObjectType,
|
||||
GraphQLList,
|
||||
} from 'graphql';
|
||||
import SubStrategyType from './SubStrategy';
|
||||
import { SubStrategyInputType } from './index';
|
||||
|
||||
const Type = new GraphQLInputObjectType({
|
||||
name: 'StrategyInput',
|
||||
description: 'Payload for strategy input',
|
||||
fields: () => ({
|
||||
subStrategies: { type: new GraphQLList(SubStrategyType) },
|
||||
subStrategies: { type: new GraphQLList(SubStrategyInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
StopLossInputType,
|
||||
BuyOrderInputType,
|
||||
SellOrderInputType,
|
||||
} from './TheSevenMonolitics';
|
||||
} from './index';
|
||||
|
||||
const Type = new GraphQLInputObjectType({
|
||||
name: 'SubStrategyInput',
|
||||
|
||||
@@ -2,8 +2,7 @@ import {
|
||||
GraphQLInputObjectType,
|
||||
GraphQLList,
|
||||
} from 'graphql';
|
||||
import InputSituationType from './Situation';
|
||||
import InputPhaseType from './Phase';
|
||||
import { SituationInputType, PhaseInputType } from './index';
|
||||
|
||||
// SituationBased
|
||||
|
||||
@@ -11,7 +10,7 @@ const EntryPointInputType = new GraphQLInputObjectType({
|
||||
name: 'EntryPointInput',
|
||||
description: 'Payload for entryPoint input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(InputSituationType) },
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -19,7 +18,7 @@ const ExitPointInputType = new GraphQLInputObjectType({
|
||||
name: 'ExitPointInput',
|
||||
description: 'Payload for exitPoint input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(InputSituationType) },
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -27,7 +26,7 @@ const SellPointInputType = new GraphQLInputObjectType({
|
||||
name: 'SellPointInput',
|
||||
description: 'Payload for sellPoint input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(InputSituationType) },
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -35,7 +34,7 @@ const BuyPointInputType = new GraphQLInputObjectType({
|
||||
name: 'BuyPointInput',
|
||||
description: 'Payload for buyPoint input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(InputSituationType) },
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -45,7 +44,7 @@ const StopLossInputType = new GraphQLInputObjectType({
|
||||
name: 'StopLossTypeInput',
|
||||
description: 'Payload for stopLossType input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(InputPhaseType) },
|
||||
situations: { type: new GraphQLList(PhaseInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -53,7 +52,7 @@ const BuyOrderInputType = new GraphQLInputObjectType({
|
||||
name: 'BuyOrderTypeInput',
|
||||
description: 'Payload for buyOrderType input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(InputPhaseType) },
|
||||
situations: { type: new GraphQLList(PhaseInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -61,7 +60,7 @@ const SellOrderInputType = new GraphQLInputObjectType({
|
||||
name: 'SellOrderTypeInput',
|
||||
description: 'Payload for sellOrderType input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(InputPhaseType) },
|
||||
situations: { type: new GraphQLList(PhaseInputType) },
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user