MCPcopy Create free account
hub / github.com/encoder-run/operator / ___Directive_locations

Method ___Directive_locations

pkg/graph/generated.go:5045–5074  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive)

Source from the content-addressed store, hash-verified

5043}
5044
5045func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
5046 fc, err := ec.fieldContext___Directive_locations(ctx, field)
5047 if err != nil {
5048 return graphql.Null
5049 }
5050 ctx = graphql.WithFieldContext(ctx, fc)
5051 defer func() {
5052 if r := recover(); r != nil {
5053 ec.Error(ctx, ec.Recover(ctx, r))
5054 ret = graphql.Null
5055 }
5056 }()
5057 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
5058 ctx = rctx // use context from middleware stack in children
5059 return obj.Locations, nil
5060 })
5061 if err != nil {
5062 ec.Error(ctx, err)
5063 return graphql.Null
5064 }
5065 if resTmp == nil {
5066 if !graphql.HasFieldError(ctx, fc) {
5067 ec.Errorf(ctx, "must not be null")
5068 }
5069 return graphql.Null
5070 }
5071 res := resTmp.([]string)
5072 fc.Result = res
5073 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
5074}
5075
5076func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5077 fc = &graphql.FieldContext{

Callers 1

___DirectiveMethod · 0.95

Tested by

no test coverage detected