Skip to content

Commit

Permalink
refactor(gatsby): Introduce built-in GraphQL types (#19951)
Browse files Browse the repository at this point in the history
* refactor(gatsby): Use schema customization for built-in types (`File` and `Directory` at the moment)

* Move built-in types from internal-data-bridge to schema/index

* One more field nullability change
  • Loading branch information
vladar authored and GatsbyJS Bot committed Dec 9, 2019
1 parent 0e9553e commit c732247
Show file tree
Hide file tree
Showing 8 changed files with 2,167 additions and 38 deletions.
8 changes: 0 additions & 8 deletions packages/gatsby-source-filesystem/src/gatsby-node.js
Expand Up @@ -124,14 +124,6 @@ const createFSMachine = (
}

exports.sourceNodes = (api, pluginOptions) => {
const typeDefs = `
type File implements Node @infer {
birthtime: Date @deprecated(reason: "Use \`birthTime\` instead")
birthtimeMs: Float @deprecated(reason: "Use \`birthTime\` instead")
}
`
api.actions.createTypes(typeDefs)

// Validate that the path exists.
if (!fs.existsSync(pluginOptions.path)) {
api.reporter.panic(`
Expand Down

0 comments on commit c732247

Please sign in to comment.