Skip to content

Recursive types #81

@nyarly

Description

@nyarly

I don't think there's a way to represent this in GraphQL, but I experimented with:

type treeObject struct {
	Tree struct {
		Entries []struct {
			Path   string
			Object treeObject
		}
	} `graphql:"... on Tree"`
	Blob struct {
		byteSize int
	} `graphql:"... on Blob"`
}

which resulted in a stack overflow panic.

The appropriate type is going to be irritating to write, but an error rather than a panic would be nice here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions