Skip to content

Commit

Permalink
chore(blog): add missing parenthesis to code example (#12372)
Browse files Browse the repository at this point in the history
<!--
  Have any questions? Check out the contributing docs at https://gatsby.dev/contribute, or
  ask in this Pull Request and a Gatsby maintainer will be happy to help :)
-->

## Description

Copied the code example and noticed that a closing parenthesis was missing.
<!-- Write a brief description of the changes introduced by this PR -->

## Related Issues

<!--
  Link to the issue that is fixed by this PR (if there is one)
  e.g. Fixes #1234, Addresses #1234, Related to #1234, etc.
-->
  • Loading branch information
sondrele authored and DSchau committed Mar 7, 2019
1 parent b54878b commit d11def5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docs/blog/2019-03-04-new-schema-customization/index.md
Expand Up @@ -150,11 +150,16 @@ exports.createResolvers = ({ createResolvers, schema }) => {
birthday: {
resolve(source, args, context, info) {
// original resolver available as "info.originalResolver"
if (Number.isNaN(new Date(source['birthday'])) {
return info.originalResolver({
...source,
birthday: '1970-01-01',
}, args, context, info)
if (Number.isNaN(new Date(source["birthday"]))) {
return info.originalResolver(
{
...source,
birthday: "1970-01-01",
},
args,
context,
info
)
} else {
return info.originalResolver(source, args, context, info)
}
Expand Down

0 comments on commit d11def5

Please sign in to comment.