flamelink / gatsby-source-flamelink

Gatsby source plugin for Flamelink
MIT License
8 stars 9 forks source link

Bugfix/gh 27 fl meta date fields #28

Closed caweidmann closed 4 years ago

caweidmann commented 4 years ago

Issue: Certain meta date fields are not showing up in GraphQL. The issue is that we use JSON.stringify() on entries and that will not convert Firebase Timestamp objects or rather it will convert them to undefined (similar to how a function would become undefined when trying to JSON.stringify it). As a result the undefined keys get stripped and don't appear in GraphQL.

Solution: Parse all Firebase Timestamp objects in a given nested entry to UTC date strings so that when the entry gets picked up by JSON.stringify() the date fields don't get stripped.