-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
In the GraphQL spec we refer to these terms:
- unwrapped nullable type
- unwrapped item type
- unwrapped type
- inner item type
- inner type
They seem to have subtly different meanings:
inner type
- for a non-null or list variant, this is the type that the non-null or list wraps (which may itself be a non-null or list).inner item type
- asinner type
but only applies to list variantsunwrapped type
- I believe this means the same asinner type
, though I could be wrong and it might mean the underlying named type. This term is only used in https://spec.graphql.org/draft/#sec-Input-and-Output-Types and both interpretations will get you the same result (through slightly different paths).unwrapped nullable type
- for a non-null variant, this means the inner type; for all other types it is the unchanged typeunwrapped item type
- for a list variant, this means the inner type; for all other types it is the unchanged type
I, personally, think it would be better to just use inner type
throughout and make the "if it is a non-null variant then the inner type otherwise the type" meaning explicit. However, a step up over the current situation would be to have a glossary explaining these terms.
If there's more subtlety to the differences between these terms I'd love to understand it.
Metadata
Metadata
Assignees
Labels
No labels