Skip to content

Commit 4ad16e8

Browse files
vertex451Artem Shcherbatiuk
and
Artem Shcherbatiuk
authored
fix(ui):switched to GraphiQL UI (#36)
* switch to GraphiQL UI --------- Co-authored-by: Artem Shcherbatiuk <[email protected]>
1 parent 483a4a7 commit 4ad16e8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: internal/config/config.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ type Config struct {
88
Port string `envconfig:"default=8080,optional"`
99
LogLevel string `envconfig:"default=INFO,optional"`
1010
WatchedDir string `envconfig:"default=definitions,required"`
11-
Handler HandlerConfig
11+
HandlerCfg HandlerConfig
1212
}
1313

1414
type HandlerConfig struct {
1515
Pretty bool `envconfig:"default=true,optional"`
1616
Playground bool `envconfig:"default=true,optional"`
17+
GraphiQL bool `envconfig:"default=true,optional"`
1718
}
1819

1920
// NewFromEnv creates a Config from environment values

Diff for: internal/manager/manager.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ func (s *Service) loadSchemaFromFile(filename string) (*graphql.Schema, error) {
163163
func (s *Service) createHandler(schema *graphql.Schema) *graphqlHandler {
164164
h := handler.New(&handler.Config{
165165
Schema: schema,
166-
Pretty: s.appCfg.Handler.Pretty,
167-
Playground: s.appCfg.Handler.Playground,
166+
Pretty: s.appCfg.HandlerCfg.Pretty,
167+
Playground: s.appCfg.HandlerCfg.Playground,
168+
GraphiQL: s.appCfg.HandlerCfg.GraphiQL,
168169
})
169170
return &graphqlHandler{
170171
schema: schema,

0 commit comments

Comments
 (0)