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.
| 94 | // just returns errors if it's asked for a resolver for a field that it doesn't |
| 95 | // know about. |
| 96 | type 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. |
| 111 | type ResolverFns struct { |
nothing calls this directly
no outgoing calls
no test coverage detected