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

Method WithSchemaIntrospection

graphql/resolve/resolver.go:201–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199}
200
201func (rf *resolverFactory) WithSchemaIntrospection() ResolverFactory {
202 return rf.
203 WithQueryResolver("__schema",
204 func(q schema.Query) QueryResolver {
205 return QueryResolverFunc(resolveIntrospection)
206 }).
207 WithQueryResolver("__type",
208 func(q schema.Query) QueryResolver {
209 return QueryResolverFunc(resolveIntrospection)
210 }).
211 WithQueryResolver("__typename",
212 func(q schema.Query) QueryResolver {
213 return QueryResolverFunc(resolveIntrospection)
214 }).
215 WithMutationResolver("__typename",
216 func(m schema.Mutation) MutationResolver {
217 return MutationResolverFunc(func(ctx context.Context, m schema.Mutation) (*Resolved, bool) {
218 return DataResult(m, map[string]interface{}{"__typename": "Mutation"}, nil),
219 resolverSucceeded
220 })
221 })
222}
223
224func (rf *resolverFactory) WithConventionResolvers(
225 s schema.Schema, fns *ResolverFns) ResolverFactory {

Callers

nothing calls this directly

Calls 6

WithQueryResolverMethod · 0.95
QueryResolverFuncFuncType · 0.85
MutationResolverFuncFuncType · 0.85
DataResultFunction · 0.85
WithMutationResolverMethod · 0.65
WithQueryResolverMethod · 0.65

Tested by

no test coverage detected