Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tests #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: add tests #1

wants to merge 2 commits into from

Conversation

jlengstorf
Copy link
Member

No description provided.

- 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.

None yet

2 participants