Skip to content

Commit

Permalink
Add locale to the arguments (#2652)
Browse files Browse the repository at this point in the history
  • Loading branch information
sprmn authored and KyleAMathews committed Oct 27, 2017
1 parent 770f233 commit c8cdd00
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/gatsby/src/schema/infer-graphql-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ function inferGraphQLType({
measurement years, months, weeks, days, hours, minutes,
and seconds.`,
},
locale: {
type: GraphQLString,
description: oneLine`
Configures the locale Moment.js will use to format the date.
`,
},
},
resolve(object, { fromNow, difference, formatString, locale = `en` }) {
let date
Expand Down

0 comments on commit c8cdd00

Please sign in to comment.