Closed xiaolinziwang closed 5 years ago
"delete": &graphql.Field{ Type: graphql.ID, Description: "delete", Args: graphql.FieldConfigArgument{ "instanceIds": &graphql.ArgumentConfig{Type:graphql.NewNonNull(graphql.NewList(graphql.String))}, }, Resolve: func(p graphql.ResolveParams) (i interface{}, e error) { log.Println("Args:", p.Args) instanceIds, := p.Args["instanceIds"].([]interface{}) instanceIdString := make([]string, len(instanceIds)) for , v := range instanceIds { instanceIdString = append(instanceIdString, v.(string)) } log.Println("instanceIdString:",instanceIdString) return "0",nil }, },
"delete": &graphql.Field{ Type: graphql.ID, Description: "delete", Args: graphql.FieldConfigArgument{ "instanceIds": &graphql.ArgumentConfig{Type:graphql.NewNonNull(graphql.NewList(graphql.String))}, }, Resolve: func(p graphql.ResolveParams) (i interface{}, e error) { log.Println("Args:", p.Args) instanceIds, := p.Args["instanceIds"].([]interface{}) instanceIdString := make([]string, len(instanceIds)) for , v := range instanceIds { instanceIdString = append(instanceIdString, v.(string)) } log.Println("instanceIdString:",instanceIdString) return "0",nil }, },