Skip to content

Using pointers with Enum types results in nils #205

Open
@threadwaste

Description

@threadwaste

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:

var enum = graphql.NewEnum(graphql.EnumConfig{
    Name: "MyEnum",
    Values: graphql.EnumValueConfigMap{
        "first-enum": &graphql.EnumValueConfig{Value: 1}
    }
}

...used with a response struct as follows:

type Response struct {
    MyEnum *int
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions