diff --git a/api/graphql.go b/api/graphql.go index 37589b1..05b2ab9 100644 --- a/api/graphql.go +++ b/api/graphql.go @@ -96,7 +96,6 @@ func NewSchema(config Config) (graphql.Schema, error) { Name: "UserConnection", Fields: graphql.Fields{ "list": &graphql.Field{Type: graphql.NewList(user)}, - "next": &graphql.Field{Type: graphql.String}, "total": &graphql.Field{Type: graphql.Int}, }, }), @@ -159,8 +158,8 @@ func NewSchema(config Config) (graphql.Schema, error) { return nil, err } return map[string]interface{}{ - "list": users, - "next": true, + "list": users, + "total": 0, }, nil }, }, @@ -169,7 +168,6 @@ func NewSchema(config Config) (graphql.Schema, error) { Name: "ImageConnection", Fields: graphql.Fields{ "list": &graphql.Field{Type: graphql.NewList(image)}, - "next": &graphql.Field{Type: graphql.String}, "total": &graphql.Field{Type: graphql.Int}, }, }), @@ -227,8 +225,8 @@ func NewSchema(config Config) (graphql.Schema, error) { } } } - case "next": - fmt.Println("next") + case "total": + fmt.Println("total") default: fmt.Println(fieldAST.Name.Value) } @@ -297,7 +295,6 @@ func NewSchema(config Config) (graphql.Schema, error) { if id_list_str == "" { return map[string]interface{}{ "list": []Image{}, - "next": false, "total": 0, }, nil } @@ -347,8 +344,8 @@ func NewSchema(config Config) (graphql.Schema, error) { } return map[string]interface{}{ - "list": images, - "next": true, + "list": images, + "total": 0, }, nil }, },