Merge pull request #185 from nikolabjelo/develop

Adapting operations link for new cockpit api
This commit is contained in:
nikolabjelo authored and GitHub committed 2019-03-20 18:51:49 +01:00
commit d5e6d73eb3
1 file changed
+1 -17
+1 -17
View File
@@ -6,9 +6,6 @@ export const linkSchemaDefs =
extend type operations_GetClones {
bot: teams_FinancialBeings
}
extend type operations_Clone {
orders( state: cockpit_OrderStateEnum ): [cockpit_Order]
}
extend type operations_Clone {
signals( state: cockpit_SignalStateEnum ): [cockpit_Signal]
}
@@ -16,26 +13,13 @@ export const linkSchemaDefs =
export const resolver = (teamsSchema, cockpitSchema) => ({
operations_Clone: {
orders: {
fragment: `fragment OrderFragment on operations_Clone{id}`,
resolve ({id: cloneId}, args, context, info) {
return info.mergeInfo.delegateToSchema({
schema: cockpitSchema,
operation: 'query',
fieldName: 'cockpit_OrdersByClondeId',
args: { ...args, cloneId },
context,
info
})
}
},
signals: {
fragment: `fragment SignalFragment on operations_Clone{id}`,
resolve ({id: cloneId}, args, context, info) {
return info.mergeInfo.delegateToSchema({
schema: cockpitSchema,
operation: 'query',
fieldName: 'cockpit_SignalsByClondeId',
fieldName: 'cockpit_SignalsByCloneId',
args: { ...args, cloneId },
context,
info