Skip to content

Commit

Permalink
added MustParseSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
neelance committed Nov 4, 2016
1 parent d5e5f60 commit de113f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ func ParseSchema(schemaString string, resolver interface{}) (*Schema, error) {
return b.ApplyResolver(resolver)
}

func MustParseSchema(schemaString string, resolver interface{}) *Schema {
s, err := ParseSchema(schemaString, resolver)
if err != nil {
panic(err)
}
return s
}

type SchemaBuilder struct {
schema *schema.Schema
}
Expand Down

0 comments on commit de113f9

Please sign in to comment.