diff --git a/gql_vex.go b/gql_vex.go index aeb0e93..f60c22e 100644 --- a/gql_vex.go +++ b/gql_vex.go @@ -40,6 +40,18 @@ func GQLVexMatchArena(p graphql.ResolveParams) (interface{}, error) { }) } +func GQLVexMatchControl(p graphql.ResolveParams) (interface{}, error) { + return GQLEventFn(p, func(event Event, p graphql.ResolveParams) (interface{}, error) { + return event.(*Match).control, nil + }) +} + +func GQLVexMatchState(p graphql.ResolveParams) (interface{}, error) { + return GQLEventFn(p, func(event Event, p graphql.ResolveParams) (interface{}, error) { + return event.(*Match).state, nil + }) +} + func GQLVexAllianceTeams(p graphql.ResolveParams) (interface{}, error) { return GQLResourceFn(p, func(resource Resource, p graphql.ResolveParams) (interface{}, error) { return resource.(*Alliance).teams, nil @@ -126,9 +138,19 @@ func GQLVexTypeMatch() * graphql.Object { }) gql_vex_type_match.AddFieldConfig("Arena", &graphql.Field{ - Type: GQLVexTypeArena(), + Type: graphql.String, Resolve: GQLVexMatchArena, }) + + gql_vex_type_match.AddFieldConfig("Control", &graphql.Field{ + Type: graphql.String, + Resolve: GQLVexMatchControl, + }) + + gql_vex_type_match.AddFieldConfig("State", &graphql.Field{ + Type: graphql.String, + Resolve: GQLVexMatchState, + }) } return gql_vex_type_match