MCPcopy Create free account
hub / github.com/vektah/gqlparser / validateDirectiveDefinitions

Function validateDirectiveDefinitions

validator/schema.go:248–261  ·  view source on GitHub ↗
(schema *Schema)

Source from the content-addressed store, hash-verified

246}
247
248func validateDirectiveDefinitions(schema *Schema) *gqlerror.Error {
249 directives := make([]string, 0, len(schema.Directives))
250 for directive := range schema.Directives {
251 directives = append(directives, directive)
252 }
253 sort.Strings(directives)
254 for _, directive := range directives {
255 err := validateDirective(schema, schema.Directives[directive])
256 if err != nil {
257 return err
258 }
259 }
260 return nil
261}
262
263func validateDirective(schema *Schema, def *DirectiveDefinition) *gqlerror.Error {
264 if err := validateName(def.Position, def.Name); err != nil {

Callers 1

ValidateSchemaDocumentFunction · 0.85

Calls 1

validateDirectiveFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…