Skip to content

Support pointers as the analoge to optional types in gel #383

@fmoor

Description

@fmoor

We currently do not allow using pointers in struct fields. Instead when a field is optional we have custom types. This design was intended to reduce the risk of nil pointer dereference bugs.

However a limitation of this design is that golang doesn't allow circular references in struct definitions. So if a gel schema has a circular reference it can not be modeled cleanly in golang.

Allowing pointer struct fields will remove this mismatch.

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