Skip to content

Commit

Permalink
feat(device_info): added graphql endpoint on go side
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddi committed Oct 24, 2018
1 parent 8b91759 commit f7101cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/api/node/graphql/resolver.go
Expand Up @@ -411,6 +411,9 @@ func (r *queryResolver) GetConversation(ctx context.Context, id string, createdA
func (r *queryResolver) GetConversationMember(ctx context.Context, id string, createdAt *time.Time, updatedAt *time.Time, deletedAt *time.Time, status *int32, contact *entity.Contact, conversationID string, contactID string) (*entity.ConversationMember, error) {
return r.client.GetConversationMember(ctx, &entity.ConversationMember{ID: id})
}
func (r *queryResolver) DeviceInfos(ctx context.Context, T bool) (*node.DeviceInfosOutput, error) {
return r.client.DeviceInfos(ctx, &node.Void{T: true})
}

type subscriptionResolver struct{ *Resolver }

Expand Down
13 changes: 13 additions & 0 deletions core/api/node/service.proto
Expand Up @@ -97,6 +97,19 @@ service Service {
};

rpc DebugPing(PingDestination) returns (Void) {};

rpc DeviceInfos(Void) returns (DeviceInfosOutput) {
option (berty.gql.graphql_type) = "Query";
};
}

message DeviceInfosOutput {
repeated DeviceInfo infos = 1;
}

message DeviceInfo {
string key = 1;
string value = 2;
}

message PingDestination {
Expand Down

0 comments on commit f7101cd

Please sign in to comment.