Adapting operation links for new versiion of the cockpit backend
This commit is contained in:
1 parent
03a9969306
commit
1ada4e724f
1 file changed
+1
-17
@@ -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
|
||||
|
||||
Reference in new issue
Block a user