|
|
|
@ -433,6 +433,12 @@ func GQLEventChildren(p graphql.ResolveParams) (interface{}, error) {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GQLEventResources(p graphql.ResolveParams) (interface{}, error) {
|
|
|
|
|
return GQLEventFn(p, func(event Event, p graphql.ResolveParams)(interface{}, error) {
|
|
|
|
|
return event.Resources(), nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var gql_list_resource * graphql.List = nil
|
|
|
|
|
func GQLListResource() * graphql.List {
|
|
|
|
|
if gql_list_resource == nil {
|
|
|
|
@ -608,6 +614,10 @@ func GQLInterfaceEvent() * graphql.Interface {
|
|
|
|
|
gql_list_event = graphql.NewList(gql_interface_event)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if gql_list_resource == nil {
|
|
|
|
|
gql_list_resource = graphql.NewList(GQLInterfaceResource())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gql_interface_event.AddFieldConfig("ID", &graphql.Field{
|
|
|
|
|
Type: graphql.String,
|
|
|
|
|
})
|
|
|
|
@ -623,6 +633,10 @@ func GQLInterfaceEvent() * graphql.Interface {
|
|
|
|
|
gql_interface_event.AddFieldConfig("Children", &graphql.Field{
|
|
|
|
|
Type: gql_list_event,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
gql_interface_event.AddFieldConfig("Resources", &graphql.Field{
|
|
|
|
|
Type: gql_list_resource,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return gql_interface_event
|
|
|
|
@ -662,6 +676,11 @@ func GQLTypeBaseEvent() * graphql.Object {
|
|
|
|
|
Type: GQLListEvent(),
|
|
|
|
|
Resolve: GQLEventChildren,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
gql_type_base_event.AddFieldConfig("Resources", &graphql.Field{
|
|
|
|
|
Type: GQLListResource(),
|
|
|
|
|
Resolve: GQLEventResources,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return gql_type_base_event
|
|
|
|
@ -698,6 +717,10 @@ func GQLTypeEventQueue() * graphql.Object {
|
|
|
|
|
Type: GQLListEvent(),
|
|
|
|
|
Resolve: GQLEventChildren,
|
|
|
|
|
})
|
|
|
|
|
gql_type_event_queue.AddFieldConfig("Resources", &graphql.Field{
|
|
|
|
|
Type: GQLListResource(),
|
|
|
|
|
Resolve: GQLEventResources,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return gql_type_event_queue
|
|
|
|
|
}
|
|
|
|
|