graphql-go / graphql

An implementation of GraphQL for Go / Golang
MIT License
9.87k stars 839 forks source link

Cannot query field \"namespaceList\" on type \"Query\"." #549

Open Naveenrajelothunkal opened 4 years ago

Naveenrajelothunkal commented 4 years ago

Find below example , the query "namespaceList" is not picking, it shows "Cannot query field \"namespaceList\" on type \"Query\"." error . var Query = graphql.NewObject( graphql.ObjectConfig{ Name: "Query", Fields: graphql.Fields{ "namespaceList": &graphql.Field{ Type: kubernetes_schema.ListNameSpaceResponse, Description: "kubernetes cluster namespace list", Args: graphql.FieldConfigArgument{ "clusterId": &graphql.ArgumentConfig{ Type: graphql.NewNonNull(graphql.String), }, }, Resolve: kubernetes.ListNameSpace, },