Cleaning the overboilerplating
This commit is contained in:
1 parent
561948ede1
commit
32ebf840fd
11 files changed
+31
-31
No files matched your search
@@ -7,8 +7,8 @@ const Type = new GraphQLObjectType({
|
||||
name: 'Condition',
|
||||
description: 'Condition definition',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
code: { type: GraphQLString },
|
||||
name: GraphQLString,
|
||||
code: GraphQLString,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ const Type = new GraphQLObjectType({
|
||||
name: 'Phase',
|
||||
description: 'Phase definition',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
code: { type: GraphQLString },
|
||||
name: GraphQLString,
|
||||
code: GraphQLString,
|
||||
situations: {
|
||||
type: new GraphQLList(SituationType),
|
||||
resolve(parent) {
|
||||
|
||||
@@ -11,7 +11,7 @@ const Type = new GraphQLObjectType({
|
||||
name: 'Situation',
|
||||
description: 'Situation definition',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
name: GraphQLString,
|
||||
conditions: {
|
||||
type: new GraphQLList(ConditionType),
|
||||
resolve(parent) {
|
||||
|
||||
@@ -12,8 +12,8 @@ const Type = new GraphQLObjectType({
|
||||
name: 'Strategy',
|
||||
description: 'Everything you need to know about a strategy',
|
||||
fields: () => ({
|
||||
id: { type: GraphQLID },
|
||||
fbId: { type: GraphQLString },
|
||||
id: GraphQLID,
|
||||
fbId: GraphQLString,
|
||||
subStrategies: {
|
||||
type: new GraphQLList(SubStrategyType),
|
||||
resolve(parent) {
|
||||
|
||||
@@ -17,7 +17,7 @@ const Type = new GraphQLObjectType({
|
||||
name: 'SubStrategy',
|
||||
description: 'SubStrategy composing a strategy',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
name: GraphQLString,
|
||||
entryPoint: {
|
||||
type: new GraphQLList(EntryPointType),
|
||||
resolve(parent) {
|
||||
|
||||
@@ -7,8 +7,8 @@ const Type = new GraphQLInputObjectType({
|
||||
name: 'ConditionInput',
|
||||
description: 'Payload for condition input',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
code: { type: GraphQLString },
|
||||
name: GraphQLString,
|
||||
code: GraphQLString,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ const Type = new GraphQLInputObjectType({
|
||||
name: 'PhaseInput',
|
||||
description: 'Payload for phase input',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
code: { type: GraphQLString },
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
name: GraphQLString,
|
||||
code: GraphQLString,
|
||||
situations: new GraphQLList(SituationInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ const Type = new GraphQLInputObjectType({
|
||||
name: 'SituationInput',
|
||||
description: 'Payload for situation input',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
conditions: { type: new GraphQLList(ConditionInputType) },
|
||||
name: GraphQLString,
|
||||
conditions: new GraphQLList(ConditionInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ const Type = new GraphQLInputObjectType({
|
||||
name: 'StrategyInput',
|
||||
description: 'Payload for strategy input',
|
||||
fields: () => ({
|
||||
subStrategies: { type: new GraphQLList(SubStrategyInputType) },
|
||||
subStrategies: new GraphQLList(SubStrategyInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -16,14 +16,14 @@ const Type = new GraphQLInputObjectType({
|
||||
name: 'SubStrategyInput',
|
||||
description: 'Payload for subStrategy input',
|
||||
fields: () => ({
|
||||
name: { type: GraphQLString },
|
||||
entryPoint: { type: EntryPointInputType },
|
||||
exitPoint: { type: ExitPointInputType },
|
||||
sellPoint: { type: SellPointInputType },
|
||||
buyPoint: { type: BuyPointInputType },
|
||||
stopLoss: { type: StopLossInputType },
|
||||
buyOrder: { type: BuyOrderInputType },
|
||||
sellOrder: { type: SellOrderInputType },
|
||||
name: GraphQLString,
|
||||
entryPoint: EntryPointInputType,
|
||||
exitPoint: ExitPointInputType,
|
||||
sellPoint: SellPointInputType,
|
||||
buyPoint: BuyPointInputType,
|
||||
stopLoss: StopLossInputType,
|
||||
buyOrder: BuyOrderInputType,
|
||||
sellOrder: SellOrderInputType,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ const EntryPointInputType = new GraphQLInputObjectType({
|
||||
name: 'EntryPointInput',
|
||||
description: 'Payload for entryPoint input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
situations: new GraphQLList(SituationInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -18,7 +18,7 @@ const ExitPointInputType = new GraphQLInputObjectType({
|
||||
name: 'ExitPointInput',
|
||||
description: 'Payload for exitPoint input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
situations: new GraphQLList(SituationInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@ const SellPointInputType = new GraphQLInputObjectType({
|
||||
name: 'SellPointInput',
|
||||
description: 'Payload for sellPoint input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
situations: new GraphQLList(SituationInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -34,7 +34,7 @@ const BuyPointInputType = new GraphQLInputObjectType({
|
||||
name: 'BuyPointInput',
|
||||
description: 'Payload for buyPoint input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(SituationInputType) },
|
||||
situations: new GraphQLList(SituationInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ const StopLossInputType = new GraphQLInputObjectType({
|
||||
name: 'StopLossTypeInput',
|
||||
description: 'Payload for stopLossType input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(PhaseInputType) },
|
||||
situations: new GraphQLList(PhaseInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ const BuyOrderInputType = new GraphQLInputObjectType({
|
||||
name: 'BuyOrderTypeInput',
|
||||
description: 'Payload for buyOrderType input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(PhaseInputType) },
|
||||
situations: new GraphQLList(PhaseInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -60,7 +60,7 @@ const SellOrderInputType = new GraphQLInputObjectType({
|
||||
name: 'SellOrderTypeInput',
|
||||
description: 'Payload for sellOrderType input',
|
||||
fields: () => ({
|
||||
situations: { type: new GraphQLList(PhaseInputType) },
|
||||
situations: new GraphQLList(PhaseInputType),
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user