Skip to content

Instantly share code, notes, and snippets.

<?php
class HumanType
{
public function getDefinition()
{
return '
type Human : Character {
id: String!
name: String
friends: [Character] @resolveMethod("getFriends")

Table of Contents

  • [Foo][1]
    • [foo][2]
  • [Foo][3]
    • [foo][4]
  • [Bar][5]
success open and validate gatsby-configs - 0.044s
success load plugins - 1.340s
success onPreInit - 0.006s
success delete html and css files from previous builds - 0.014s
success initialize cache - 0.010s
success copy gatsby files - 0.145s
success onPreBootstrap - 3.133s
success createSchemaCustomization - 0.003s
success source and transform nodes - 14.054s
success building schema - 0.573s
gatsby build
SET_LOGS 1
SET_PROGRAM 1
SET_SITE_CONFIG 1
success open and validate gatsby-configs - 0.041s
success load plugins - 0.924s
success onPreInit - 0.005s
SET_SITE_FLATTENED_PLUGINS 1
success delete html and css files from previous builds - 0.012s
DELETE_CACHE 1
fetch all Airtable rows from 3 tables: 4401.137ms
create node recfeQZT1bAUaFiG8 data: [ 'Name',
'Cooking_Method___NODE',
'Style___NODE',
'URL',
'Ingredients',
'Directions',
'Rating' ]
create node recXFnf5mWIMx6lO3 data: [ 'Name',
'Cooking_Method___NODE',
@vladar
vladar / pr-22377.gql
Last active August 12, 2023 08:23
Medium Schema Customization
type MediumCollection implements Node @derivedTypes @dontInfer {
name: String
slug: String
tags: [String]
creatorId: String
description: String
shortDescription: String
image: MediumCollectionImage
metadata: MediumCollectionMetadata
virtuals: MediumCollectionVirtuals
diff --git a/packages/gatsby-plugin-page-creator/src/derive-path.ts b/packages/gatsby-plugin-page-creator/src/derive-path.ts
index 4d7a2aa78..4c9070e2c 100644
--- a/packages/gatsby-plugin-page-creator/src/derive-path.ts
+++ b/packages/gatsby-plugin-page-creator/src/derive-path.ts
@@ -5,7 +5,7 @@ import _ from "lodash"
// src/pages/product/{sku__en} => product/:sku__en pulls from nodes.sku.en
export function derivePath(path: string, node: Record<string, any>): string {
// 1. Remove the extension
- const pathWithoutExtension = path.replace(/\.[a-z]+$/, ``)
+ let pathWithoutExtension = path.replace(/\.[a-z]+$/, ``)
exports.onCreateNode = async ({
node,
actions: { createNode },
createNodeId,
getCache,
}) => {
if (node.remoteTypeName === 'Asset' && node.mimeType.includes('image/')) {
const fileNode = await createRemoteFileNode({
url: node.url,
parentNodeId: node.id,
exports.sourceNodes = async (gatsbyAPI, pluginOptions) => {
const config = await createSourcingConfig(gatsbyApi)
const { webhookBody } = gatsbyAPI
if (webhookBody && Object.keys(webhookBody).length) {
const { isDelete, typeName, id } = webhookBody
const nodeEvent = isDelete
? {
eventName: "DELETE",
remoteTypeName: typeName,
const {
wrapQueryExecutorWithQueue,
loadSchema,
generateDefaultFragments,
compileNodeQueries,
buildNodeDefinitions,
createSchemaCustomization,
sourceAllNodes,
sourceNodeChanges,
} = require('gatsby-graphql-source-toolkit')