graphql-go / graphql-go/handler

Field showing deprecated directive

Open
#66 1 comment 6 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
451
Forks
135
PR merge metrics
No merged PRs in 30d

Description

Somehow field is showing deprecated
[screenshot](https://snag.gy/K7THjX.jpg)
code :
```
package main

import (
"fmt"
"net/http"

"github.com/graphql-go/graphql"
"github.com/graphql-go/handler"
)

var schema, _ = graphql.NewSchema(
graphql.SchemaConfig{
Query: graphql.NewObject(
graphql.ObjectConfig{
Name: "Query",
Fields: graphql.Fields{
"healthz": &graphql.Field{
Type: graphql.String,
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
return "ok", nil
},
},
},
},
),
Mutation: graphql.NewObject(
graphql.ObjectConfig{
Name: "Mutation",
Fields: graphql.Fields{
"healthz": &graphql.Field{
Type: graphql.String,
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
return "ok", nil
},
},
},
},
),
},
)

var port = ":8080"

func main() {

http.Handle("/", handler.New(&handler.Config{
Schema: &schema,
GraphiQL: false,
Playground: true,
}))
fmt.Println("Now server is running on port " + port)
http.ListenAndServe(port, nil)
}
```

how to remove deprecated directive ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.