Merge pull request #8 from nikolabjelo/develop

Switching from "actif" to "active"
This commit is contained in:
nikolabjelo authored and GitHub committed 2019-03-26 10:44:28 +01:00
commit 3d76391aec
5 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ const strategySchema = new Schema(
dropDups: true,
},
subStrategies: [{
actif: {
active: {
type: Boolean,
required: true,
default: true,
+4 -4
View File
@@ -16,11 +16,11 @@ const Type = new GraphQLObjectType({
id: { type: GraphQLID },
fbSlug: { type: GraphQLString },
subStrategies: {
args: { actifOnly: { type: GraphQLBoolean } },
args: { activeOnly: { type: GraphQLBoolean } },
type: new GraphQLList(SubStrategyType),
resolve(parent, { actifOnly }) {
if (actifOnly) {
return parent.subStrategies.filter(subStrategy => subStrategy.actif);
resolve(parent, { activeOnly }) {
if (activeOnly) {
return parent.subStrategies.filter(subStrategy => subStrategy.active);
}
return parent.subStrategies;
},
+1 -1
View File
@@ -17,7 +17,7 @@ const Type = new GraphQLObjectType({
name: 'SubStrategy',
description: 'SubStrategy composing a strategy',
fields: () => ({
actif: { type: GraphQLBoolean },
active: { type: GraphQLBoolean },
name: { type: GraphQLString },
entryPoint: {
type: EntryPointType,
+1 -1
View File
@@ -17,7 +17,7 @@ const Type = new GraphQLInputObjectType({
name: 'SubStrategyInput',
description: 'Payload for subStrategy input',
fields: () => ({
actif: { type: GraphQLBoolean },
active: { type: GraphQLBoolean },
name: { type: GraphQLString },
entryPoint: { type: EntryPointInputType },
exitPoint: { type: ExitPointInputType },
+3 -3
View File
@@ -2,7 +2,7 @@
const strategy = {
subStrategies: [
{
actif: true,
active: true,
name: 'Trend Following',
entryPoint: {
situations: [
@@ -181,7 +181,7 @@ const strategy = {
},
},
{
actif: true,
active: true,
name: 'Range Trading',
entryPoint: {
situations: [
@@ -255,7 +255,7 @@ const strategy = {
},
},
{
actif: true,
active: true,
name: 'LRC Strategy',
entryPoint: {
situations: [