Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kofoworola committed Oct 30, 2023
1 parent bbf32ef commit ace8080
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
16 changes: 8 additions & 8 deletions analytics/analytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,20 @@ func (a *AnalyticsRecord) SetObjectID(id model.ObjectID) {
type GraphQLOperations int

const (
Operation_Unknown GraphQLOperations = iota
Operation_Query
Operation_Mutation
Operation_Subscription
OperationUnknown GraphQLOperations = iota
OperationQuery
OperationMutation
OperationSubscription
)

type GraphQLStats struct {
IsGraphQL bool
Types map[string][]string
OperationType GraphQLOperations
Variables string
RootFields []string
HasErrors bool
Types map[string][]string
Errors []GraphError
OperationType GraphQLOperations
HasErrors bool
IsGraphQL bool
}

type GraphError struct {
Expand Down
18 changes: 9 additions & 9 deletions serializer/protobuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ func (pb *ProtobufSerializer) TransformSingleRecordToProto(rec analytics.Analyti
// operation type
operationType := analyticsproto.GraphQLOperations_OPERATION_UNKNOWN
switch rec.GraphQLStats.OperationType {
case analytics.Operation_Query:
case analytics.OperationQuery:
operationType = analyticsproto.GraphQLOperations_OPERATION_QUERY
case analytics.Operation_Mutation:
case analytics.OperationMutation:
operationType = analyticsproto.GraphQLOperations_OPERATION_MUTATION
case analytics.Operation_Subscription:
case analytics.OperationSubscription:
operationType = analyticsproto.GraphQLOperations_OPERATION_SUBSCRIPTION
}
//graph errors
// graph errors
graphErrors := make([]string, len(rec.GraphQLStats.Errors))
for i, val := range rec.GraphQLStats.Errors {
graphErrors[i] = val.Message
Expand Down Expand Up @@ -179,16 +179,16 @@ func (pb *ProtobufSerializer) TransformSingleProtoToAnalyticsRecord(rec analytic

if rec.GraphQLStats != nil {
// process anc convert graphql stats
operationType := analytics.Operation_Unknown
var operationType analytics.GraphQLOperations
switch rec.GraphQLStats.OperationType {
case analyticsproto.GraphQLOperations_OPERATION_QUERY:
operationType = analytics.Operation_Query
operationType = analytics.OperationQuery
case analyticsproto.GraphQLOperations_OPERATION_MUTATION:
operationType = analytics.Operation_Mutation
operationType = analytics.OperationMutation
case analyticsproto.GraphQLOperations_OPERATION_SUBSCRIPTION:
operationType = analytics.Operation_Subscription
operationType = analytics.OperationSubscription
default:
operationType = analytics.Operation_Unknown
operationType = analytics.OperationUnknown
}

types := make(map[string][]string)
Expand Down

0 comments on commit ace8080

Please sign in to comment.