file size non null

This commit is contained in:
Djeeberjr 2021-07-27 21:24:36 +02:00
parent 48eea73833
commit f5a1bd77d1

View File

@ -55,7 +55,7 @@ func graphqlTypes() {
}, },
}, },
"size": &graphql.Field{ "size": &graphql.Field{
Type: graphql.Int, Type: graphql.NewNonNull(graphql.Int),
Resolve: func(p graphql.ResolveParams) (interface{}, error) { Resolve: func(p graphql.ResolveParams) (interface{}, error) {
file, err := loadFile(p) file, err := loadFile(p)
if err != nil { if err != nil {