blob: e929fb44f74597aa8ace09d4dc867ef7ddd09428 (
plain) (
tree)
|
|
package graphql
import "github.com/graphql-go/graphql"
func newGraphqlSchema() (graphql.Schema, error) {
rootQuery := graphql.ObjectConfig{
Name: "RootQuery",
Fields: graphql.Fields{
"hello": &graphql.Field{
Type: graphql.String,
},
},
}
schemaConfig := graphql.SchemaConfig{
Query: graphql.NewObject(rootQuery),
}
return graphql.NewSchema(schemaConfig)
}
|