Skip to content

Commit

Permalink
Merge pull request #99 from flotiq/bugfix/24929-error-from-_webhook-ctd
Browse files Browse the repository at this point in the history
fix graphQL schema creation after changes in _webhook CTD
  • Loading branch information
WHLukasz authored Jun 27, 2024
2 parents de5fe3f + b8534ee commit b3f3878
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 b3f3878

Please sign in to comment.