MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / resolverFactory

Struct resolverFactory

graphql/resolve/resolver.go:96–108  ·  view source on GitHub ↗

A resolverFactory is the main implementation of ResolverFactory. It stores a map of all the resolvers that have been registered and returns a resolver that just returns errors if it's asked for a resolver for a field that it doesn't know about.

Source from the content-addressed store, hash-verified

94// just returns errors if it's asked for a resolver for a field that it doesn't
95// know about.
96type resolverFactory struct {
97 sync.RWMutex
98 queryResolvers map[string]func(schema.Query) QueryResolver
99 mutationResolvers map[string]func(schema.Mutation) MutationResolver
100
101 queryMiddlewareConfig map[string]QueryMiddlewares
102 mutationMiddlewareConfig map[string]MutationMiddlewares
103
104 // returned if the factory gets asked for resolver for a field that it doesn't
105 // know about.
106 queryError QueryResolverFunc
107 mutationError MutationResolverFunc
108}
109
110// ResolverFns is a convenience struct for passing blocks of rewriters and executors.
111type ResolverFns struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected