feat: Expose triggers of twitter integration with app query
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
c8e3a458ff
commit
a3dd76df21
@@ -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."
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLInt } from 'graph
|
|||||||
import fieldType from './field';
|
import fieldType from './field';
|
||||||
import authenticationStepType from './authentication-step';
|
import authenticationStepType from './authentication-step';
|
||||||
import reconnectionStepType from './reconnection-step';
|
import reconnectionStepType from './reconnection-step';
|
||||||
|
import triggerType from './trigger';
|
||||||
|
|
||||||
const appType = new GraphQLObjectType({
|
const appType = new GraphQLObjectType({
|
||||||
name: 'App',
|
name: 'App',
|
||||||
@@ -18,6 +19,7 @@ const appType = new GraphQLObjectType({
|
|||||||
fields: { type: GraphQLList(fieldType) },
|
fields: { type: GraphQLList(fieldType) },
|
||||||
authenticationSteps: { type: GraphQLList(authenticationStepType) },
|
authenticationSteps: { type: GraphQLList(authenticationStepType) },
|
||||||
reconnectionSteps: { type: GraphQLList(reconnectionStepType) },
|
reconnectionSteps: { type: GraphQLList(reconnectionStepType) },
|
||||||
|
triggers: { type: GraphQLList(triggerType) },
|
||||||
connections: { type: GraphQLList(connectionType) },
|
connections: { type: GraphQLList(connectionType) },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
packages/backend/src/graphql/types/trigger.ts
Normal file
12
packages/backend/src/graphql/types/trigger.ts
Normal file
@@ -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;
|
Reference in New Issue
Block a user