-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I'm not entirely sure how I managed to do this and feel it must be an edge-case but I have a Field without a directives property (it's a __typename field). This makes apollo-link-serialize throw an error when used in conjunction with apollo-link-queue and opening the gate.
Specific error is: TypeError: can't access property "map", directives is undefined
The check on this line assumes that directives is an array but it could also be undefined. An extra data integrity check, something like if (!directive) return [];, seems to do the trick and resumes expected behaviour. If you think this use-case is valid I'll try to put together a PR with a test for it.
Metadata
Metadata
Assignees
Labels
No labels