Skip to content

Commit

Permalink
graphql: report all errors during schema update (#5425)
Browse files Browse the repository at this point in the history
This PR makes sure that all schema related errors are reported during schema update.
Fixes #GRAPHQL-455
  • Loading branch information
abhimanyusinghgaur authored May 12, 2020
1 parent cb01b0d commit 401e052
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions graphql/admin/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ func (asr *updateSchemaResolver) Rewrite(
if err != nil {
return nil, err
}
_, err = schema.FromString(schHandler.GQLSchema())
if err != nil {
return nil, err
}
asr.newDgraphSchema = schHandler.DGSchema()

// There will always be a graphql schema node present in Dgraph cluster. So, we just need to
Expand Down

0 comments on commit 401e052

Please sign in to comment.