(ctx context.Context, obj interface{})
| 7183 | } |
| 7184 | |
| 7185 | func (ec *executionContext) unmarshalInputQueryInput(ctx context.Context, obj interface{}) (model.QueryInput, error) { |
| 7186 | var it model.QueryInput |
| 7187 | asMap := map[string]interface{}{} |
| 7188 | for k, v := range obj.(map[string]interface{}) { |
| 7189 | asMap[k] = v |
| 7190 | } |
| 7191 | |
| 7192 | fieldsInOrder := [...]string{"query", "page", "limit"} |
| 7193 | for _, k := range fieldsInOrder { |
| 7194 | v, ok := asMap[k] |
| 7195 | if !ok { |
| 7196 | continue |
| 7197 | } |
| 7198 | switch k { |
| 7199 | case "query": |
| 7200 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("query")) |
| 7201 | data, err := ec.unmarshalNString2string(ctx, v) |
| 7202 | if err != nil { |
| 7203 | return it, err |
| 7204 | } |
| 7205 | it.Query = data |
| 7206 | case "page": |
| 7207 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) |
| 7208 | data, err := ec.unmarshalOInt2ᚖint(ctx, v) |
| 7209 | if err != nil { |
| 7210 | return it, err |
| 7211 | } |
| 7212 | it.Page = data |
| 7213 | case "limit": |
| 7214 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit")) |
| 7215 | data, err := ec.unmarshalOInt2ᚖint(ctx, v) |
| 7216 | if err != nil { |
| 7217 | return it, err |
| 7218 | } |
| 7219 | it.Limit = data |
| 7220 | } |
| 7221 | } |
| 7222 | |
| 7223 | return it, nil |
| 7224 | } |
| 7225 | |
| 7226 | // endregion **************************** input.gotpl ***************************** |
| 7227 |
no test coverage detected