graphql-go / graphql

An implementation of GraphQL for Go / Golang
MIT License
9.88k stars 840 forks source link

Fix Playground marking fields as @deprecated when they're not #524

Closed MarkKremer closed 4 years ago

MarkKremer commented 4 years ago

Fixes #504

In the issue I said that making DeprecationReason nillable in the struct is probably better. However, that makes it unnecessarily complicated to assign a string to it. Instead, I fixed the problem by using a resolver that returns nil if DeprecationReason is an empty string.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.02%) to 92.377% when pulling d0c0ac36d544a6e874a57cf805cdef285e9c7cfc on MarkKremer:master into 5fa0612dc4df52a24d62abd7dfd0bd92ec45ba5c on graphql-go:master.