schema non null

This commit is contained in:
Djeeberjr 2021-08-10 11:22:10 +02:00
parent ad80860368
commit 926701125d

View File

@ -12,7 +12,7 @@ func graphqlSchema() (graphql.Schema, error) {
queryFields := graphql.Fields{ queryFields := graphql.Fields{
"files": &graphql.Field{ "files": &graphql.Field{
Type: graphql.NewNonNull(graphql.NewList(graphqlFileType)), Type: graphql.NewNonNull(graphql.NewList(graphql.NewNonNull(graphqlFileType))),
Args: graphql.FieldConfigArgument{ Args: graphql.FieldConfigArgument{
"path": &graphql.ArgumentConfig{ "path": &graphql.ArgumentConfig{
Type: graphql.NewNonNull(graphql.String), Type: graphql.NewNonNull(graphql.String),
@ -30,7 +30,7 @@ func graphqlSchema() (graphql.Schema, error) {
}, },
}, },
"directorys": &graphql.Field{ "directorys": &graphql.Field{
Type: graphql.NewNonNull(graphql.NewList(graphqlDirType)), Type: graphql.NewNonNull(graphql.NewList(graphql.NewNonNull(graphqlDirType))),
Args: graphql.FieldConfigArgument{ Args: graphql.FieldConfigArgument{
"path": &graphql.ArgumentConfig{ "path": &graphql.ArgumentConfig{
Type: graphql.NewNonNull(graphql.String), Type: graphql.NewNonNull(graphql.String),