Skip to content

Conversation

@jlengstorf
Copy link
Member

No description provided.

@jlengstorf jlengstorf requested a review from kbrandwijk January 11, 2018 23:24
- move context Model into an object to avoid `this` problems
- make `date` and `year` fields optional
- add docs for the `date` query and the `Numbers_Trivia` type
- remove references to internal IBM docs
@jlengstorf
Copy link
Member Author

@kbrandwijk This should be ready to go. You can test with:

yarn add @gramps/data-source-numbers@beta

v1.0.0-beta2 should be the latest beta release.

@jlengstorf jlengstorf closed this Jan 14, 2018
@jlengstorf jlengstorf reopened this Jan 14, 2018
@jlengstorf
Copy link
Member Author

Close/reopen to trigger a Travis build.

Numbers_Trivia: {
date: data => data.date || null,
year: data => data.year || null,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add resolvers for the optional response fields?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The date and year fields aren’t always returned, so they might come back undefined. This way we can make sure nothing explodes and we’re explicitly returning null if these aren’t set.

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.

2 participants