Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field showing deprecated directive #66

Open
estrados opened this issue Feb 21, 2019 · 1 comment
Open

Field showing deprecated directive #66

estrados opened this issue Feb 21, 2019 · 1 comment

Comments

@estrados
Copy link

Somehow field is showing deprecated
screenshot
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 ?

@david-castaneda
Copy link

@estrados Did you find a solution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants