Skip to content

Unwrap type for non-null lists of non null items#31

Merged
jneurock merged 1 commit intokloeckner-i:masterfrom
louim:bugfix/non-null-list-of-non-nulls
Nov 3, 2019
Merged

Unwrap type for non-null lists of non null items#31
jneurock merged 1 commit intokloeckner-i:masterfrom
louim:bugfix/non-null-list-of-non-nulls

Conversation

@louim
Copy link
Copy Markdown
Contributor

@louim louim commented Nov 2, 2019

Non null lists were not unwrapped, producing an error like:

index.js:89 TypeError: Cannot read property 'id' of undefined
    at getFieldType (index.js:15)
    at selectedFieldsReducer (index.js:26)
    at utils.js:41
    at Array.reduce (<anonymous>)
    at index.js:41
    at create.js:15
    at create.js:35
    at query.js:29
    at Object.nonNullListOfPeople (utils.js:41)
    at eval (mock.js:105)

Added an acceptance test covering the problem to prevent regressions.

This fixes #29

non null lists were not unwrapped, producing an error like:

index.js:89 TypeError: Cannot read property 'id' of undefined
    at getFieldType (index.js:15)
    at selectedFieldsReducer (index.js:26)
    at utils.js:41
    at Array.reduce (<anonymous>)
    at index.js:41
    at create.js:15
    at create.js:35
    at query.js:29
    at Object.nonNullListOfPeople (utils.js:41)
    at eval (mock.js:105)

Add an acceptance test covering the problem to prevent regressions.
@jneurock jneurock merged commit 2ebd284 into kloeckner-i:master Nov 3, 2019
@jneurock
Copy link
Copy Markdown
Contributor

jneurock commented Nov 3, 2019

Thanks for fixing this!!

@louim louim deleted the bugfix/non-null-list-of-non-nulls branch November 4, 2019 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot query non-null list of non-null objects

2 participants