8d1a765fd6
This partially reverts commit 516241e406
.
Endpoints are added to the backend, as there are some customers who may
use these endpoints, even though they are no longer necessary for the
satellite UI.
Change-Id: I52a99912d9eacf269fbb2ddca603e53c4af6d6bf
28 lines
670 B
Go
28 lines
670 B
Go
// Copyright (C) 2018 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package consoleql
|
|
|
|
import (
|
|
"github.com/graphql-go/graphql"
|
|
"go.uber.org/zap"
|
|
|
|
"storj.io/storj/satellite/console"
|
|
"storj.io/storj/satellite/mailservice"
|
|
)
|
|
|
|
// CreateSchema creates a schema for satellites console graphql api.
|
|
func CreateSchema(log *zap.Logger, service *console.Service, mailService *mailservice.Service) (schema graphql.Schema, err error) {
|
|
creator := TypeCreator{}
|
|
|
|
err = creator.Create(log, service, mailService)
|
|
if err != nil {
|
|
return
|
|
}
|
|
|
|
return graphql.NewSchema(graphql.SchemaConfig{
|
|
Query: creator.RootQuery(),
|
|
Mutation: creator.RootMutation(),
|
|
})
|
|
}
|