To summarize:
graphq.Params doesn't have FormatErrorFn func(err error) gqlerrors.FormattedError as an argument, but is there a way to return readable errors with graphq.Params?
I'm actually confused as to why there are two different ways to serve the schema. why is the GraphQL schema being served differently in the examples linked above?
I initially wired up my GraphQL handler with gorilla mux, thinking that it should return errors as shown in this article. https://ednsquare.com/story/go-graphql-handling-graphql-errors-4------dToD9I
But, it didn't work, and it seems like the errors are only correctly shown with the
handler.Config
method. https://github.com/gufranmirza/go-graphql-swapi/blob/master/go-greaphql-part-1/after/main.goI wanted to use Context as shown in this example. https://github.com/graphql-go/graphql/blob/master/examples/context/main.go, but is there a way to return errors with
graphql.Do
method?To summarize:
graphq.Params
doesn't haveFormatErrorFn func(err error) gqlerrors.FormattedError
as an argument, but is there a way to return readable errors withgraphq.Params
? I'm actually confused as to why there are two different ways to serve the schema. why is the GraphQL schema being served differently in the examples linked above?