graphql-go / graphql-go/graphql
Using pointers with Enum types results in nils
Open
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 845
- PR merge metrics
- No merged PRs in 30d
Description
This is an extension of the issue highlighted by #114, and subsequently unintentionally fixed in #199. Specifically, the use of a pointer in a response type results in no resolution when e.g. serializing an Enum type.
Example, an Enum type of:
```go
var enum = graphql.NewEnum(graphql.EnumConfig{
Name: "MyEnum",
Values: graphql.EnumValueConfigMap{
"first-enum": &graphql.EnumValueConfig{Value: 1}
}
}
````
...used with a response struct as follows:
```go
type Response struct {
MyEnum *int
}
```
Contributor guide
Assessment
This issue has not been assessed yet.