Merge pull request #8 from nikolabjelo/develop
Switching from "actif" to "active"
This commit is contained in:
5 files changed
+10
-10
No files matched your search
@@ -9,7 +9,7 @@ const strategySchema = new Schema(
|
||||
dropDups: true,
|
||||
},
|
||||
subStrategies: [{
|
||||
actif: {
|
||||
active: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: true,
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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: [
|
||||
|
||||
Reference in new issue
Block a user