diff --git a/packages/backend/src/apps/twitter/info.json b/packages/backend/src/apps/twitter/info.json index a91ce781..4818080a 100644 --- a/packages/backend/src/apps/twitter/info.json +++ b/packages/backend/src/apps/twitter/info.json @@ -214,5 +214,17 @@ } ] } + ], + "triggers": [ + { + "name": "My Tweet", + "key": "myTweet", + "description": "Will be triggered when you tweet something new." + }, + { + "name": "User Tweet", + "key": "userTweet", + "description": "Will be triggered when a specific user tweet something new." + } ] } diff --git a/packages/backend/src/graphql/types/app.ts b/packages/backend/src/graphql/types/app.ts index 5e43cf65..b849c870 100644 --- a/packages/backend/src/graphql/types/app.ts +++ b/packages/backend/src/graphql/types/app.ts @@ -2,6 +2,7 @@ import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLInt } from 'graph import fieldType from './field'; import authenticationStepType from './authentication-step'; import reconnectionStepType from './reconnection-step'; +import triggerType from './trigger'; const appType = new GraphQLObjectType({ name: 'App', @@ -18,6 +19,7 @@ const appType = new GraphQLObjectType({ fields: { type: GraphQLList(fieldType) }, authenticationSteps: { type: GraphQLList(authenticationStepType) }, reconnectionSteps: { type: GraphQLList(reconnectionStepType) }, + triggers: { type: GraphQLList(triggerType) }, connections: { type: GraphQLList(connectionType) }, } } diff --git a/packages/backend/src/graphql/types/trigger.ts b/packages/backend/src/graphql/types/trigger.ts new file mode 100644 index 00000000..9185bb52 --- /dev/null +++ b/packages/backend/src/graphql/types/trigger.ts @@ -0,0 +1,12 @@ +import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLInt } from 'graphql'; + +const triggerType = new GraphQLObjectType({ + name: 'Trigger', + fields: { + name: { type: GraphQLString }, + key: { type: GraphQLString }, + description: { type: GraphQLString } + } +}) + +export default triggerType;