MCPcopy
hub / github.com/dgraph-io/dgraph / LoadSchemaFromString

Function LoadSchemaFromString

graphql/test/test.go:49–57  ·  view source on GitHub ↗
(t *testing.T, sch string)

Source from the content-addressed store, hash-verified

47}
48
49func LoadSchemaFromString(t *testing.T, sch string) schema.Schema {
50 handler, err := schema.NewHandler(sch, false)
51 requireNoGQLErrors(t, err)
52
53 schema := LoadSchema(t, handler.GQLSchema())
54 schema.SetMeta(handler.MetaInfo())
55
56 return schema
57}
58
59// GetMutation gets a single schema.Mutation from a schema.Operation.
60// It will fail if op is not a mutation or there's more than one mutation in

Calls 6

GQLSchemaMethod · 0.95
MetaInfoMethod · 0.95
NewHandlerFunction · 0.92
requireNoGQLErrorsFunction · 0.85
LoadSchemaFunction · 0.85
SetMetaMethod · 0.65