Skip to content
This repository was archived by the owner on Jul 6, 2020. It is now read-only.

Fix #unwrapType by recursively unwrapping to find root scalar or composite type #150

Merged
merged 1 commit into from
Jan 6, 2020

Conversation

imranolas
Copy link

@imranolas imranolas commented Jan 6, 2020

type Query {
	threads: [Thread!]
}

type Thread {
	id: ID!
	title: String!
}

Given the schema above the following threads selection set would be incorrectly identified as a list.

query {
	threads {
		id
		title
	}
}

This change recurses through the linked types, unwrapping each one until the root non-wrapping type is found.

@imranolas imranolas requested review from kitten, JoviDeCroock and andyrichardson and removed request for kitten and JoviDeCroock January 6, 2020 16:34
@imranolas imranolas changed the title Recursively unwrap to find root scalar or composite type Fix #unwrapType by recursively unwrapping to find root scalar or composite type Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants