Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive types #81

Open
nyarly opened this issue Oct 30, 2020 · 1 comment
Open

Recursive types #81

nyarly opened this issue Oct 30, 2020 · 1 comment

Comments

@nyarly
Copy link

nyarly commented Oct 30, 2020

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.

@dmitshur
Copy link
Member

Also see past discussion in shurcooL/graphql#9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants