(ctx context.Context, field graphql.CollectedField)
| 1915 | } |
| 1916 | |
| 1917 | func (ec *executionContext) _Mutation_deleteModel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { |
| 1918 | fc, err := ec.fieldContext_Mutation_deleteModel(ctx, field) |
| 1919 | if err != nil { |
| 1920 | return graphql.Null |
| 1921 | } |
| 1922 | ctx = graphql.WithFieldContext(ctx, fc) |
| 1923 | defer func() { |
| 1924 | if r := recover(); r != nil { |
| 1925 | ec.Error(ctx, ec.Recover(ctx, r)) |
| 1926 | ret = graphql.Null |
| 1927 | } |
| 1928 | }() |
| 1929 | resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { |
| 1930 | ctx = rctx // use context from middleware stack in children |
| 1931 | return ec.resolvers.Mutation().DeleteModel(rctx, fc.Args["id"].(string)) |
| 1932 | }) |
| 1933 | if err != nil { |
| 1934 | ec.Error(ctx, err) |
| 1935 | return graphql.Null |
| 1936 | } |
| 1937 | if resTmp == nil { |
| 1938 | if !graphql.HasFieldError(ctx, fc) { |
| 1939 | ec.Errorf(ctx, "must not be null") |
| 1940 | } |
| 1941 | return graphql.Null |
| 1942 | } |
| 1943 | res := resTmp.(*model.Model) |
| 1944 | fc.Result = res |
| 1945 | return ec.marshalNModel2ᚖgithubᚗcomᚋencoderᚑrunᚋoperatorᚋpkgᚋgraphᚋmodelᚐModel(ctx, field.Selections, res) |
| 1946 | } |
| 1947 | |
| 1948 | func (ec *executionContext) fieldContext_Mutation_deleteModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { |
| 1949 | fc = &graphql.FieldContext{ |
no test coverage detected