Skip to content

Commit

Permalink
stop swallowing errors on bad schemas
Browse files Browse the repository at this point in the history
i have no idea why you would want to do this, it just leads to
incredibly cryptic second-order errors and logs being sent into the
abyss
  • Loading branch information
vito committed Oct 12, 2023
1 parent 6b7534b commit 77189e4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package tools

import (
"context"
"encoding/json"
"fmt"

"github.com/dagger/graphql"
"github.com/dagger/graphql/language/ast"
Expand Down Expand Up @@ -93,10 +91,8 @@ func (c *ExecutableSchema) Make(ctx context.Context) (graphql.Schema, error) {
}

schema, err := graphql.NewSchema(*schemaConfig)
if err != nil && c.Debug {
j, _ := json.MarshalIndent(registry.dependencyMap, "", " ")
fmt.Println("Unresolved types, thunks will be used")
fmt.Println(string(j))
if err != nil {
return graphql.Schema{}, err
}

// create a new schema
Expand Down

0 comments on commit 77189e4

Please sign in to comment.