Skip to content

Commit

Permalink
fix graphQL schema creation after changes in _webhook CTD
Browse files Browse the repository at this point in the history
  • Loading branch information
CiotkaCierpienia committed Jun 27, 2024
1 parent de5fe3f commit b8534ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ const createTypeDefs = (contentTypesDefinitions, schema, includeTypes) => {
interfaces: ["Node"],
};
Object.keys(ctd.schemaDefinition.allOf[1].properties).forEach(property => {
if(['if', 'else', 'then'].includes(property) || !ctd.metaDefinition.propertiesConfig[property]) {
return;
}
tmpDef.fields[property] = getType(
ctd.metaDefinition.propertiesConfig[property],
ctd.schemaDefinition.required.indexOf(property) > -1,
Expand Down

0 comments on commit b8534ee

Please sign in to comment.