Skip to content

Field showing deprecated directive #66

@estrados

Description

@estrados

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions