Skip to content

Commit

Permalink
feat: add node.GenerateDummyData (fix #226)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 5, 2018
1 parent 1f9e22a commit 3d7fd6c
Show file tree
Hide file tree
Showing 10 changed files with 241 additions and 75 deletions.
2 changes: 1 addition & 1 deletion core/Makefile
Expand Up @@ -33,7 +33,7 @@ help:
.PHONY: dev
dev: install
@if ! command -v gin &>/dev/null; then go get github.com/codegangsta/gin; fi
$(BUILD_ENV) gin --immediate --appPort=1337 --build=./cmd/berty run -- daemon $(RUN_DEAMON_OPTS)
$(BUILD_ENV) gin --immediate --appPort=1337 --build=./cmd/berty run -- daemon $(RUN_DAEMON_OPTS)

.PHONY: run
run: $(BIN)
Expand Down
15 changes: 15 additions & 0 deletions core/api/client/jsonclient/berty.node.service.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions core/api/node/graphql/graph/graph.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions core/api/node/graphql/resolver.go
Expand Up @@ -107,6 +107,11 @@ func (r *mutationResolver) ConversationAddMessage(ctx context.Context, conversat
}))
}

func (r *mutationResolver) GenerateFakeData(ctx context.Context) (*model.BertyNodeVoid, error) {
_, err := r.client.GenerateFakeData(ctx, &service.Void{})
return &model.BertyNodeVoid{}, err
}

type queryResolver struct{ *Resolver }

func (r *queryResolver) EventList(ctx context.Context, limit *int) ([]*model.BertyP2pEvent, error) {
Expand Down
1 change: 1 addition & 0 deletions core/api/node/graphql/service.gen.graphql
Expand Up @@ -409,6 +409,7 @@ type Mutation {
ConversationInvite(conversationID: String!, contactsID: [String!]!): BertyEntityConversation
ConversationExclude(conversationID: String!, contactsID: [String!]!): BertyEntityConversation
ConversationAddMessage(conversationID: String!, message: String!): BertyP2pEvent
GenerateFakeData: BertyNodeVoid
}
type Query {
EventList(limit: Int): [BertyP2pEvent]
Expand Down
155 changes: 95 additions & 60 deletions core/api/node/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d7fd6c

Please sign in to comment.