Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
extend type FormsQuery {
getSettings: FormsSettingsResponse
}
extend type FormsMutation {
updateSettings(data: FormsSettingsInput): FormsSettingsResponse
}
`,
resolvers: {
FormsQuery: {
getSettings: resolveGetSettings(getFormSettings)
},
FormsMutation: {
updateSettings: resolveUpdateSettings(getFormSettings)
}
}
};
}
extend type PbQuery {
getSettings: PbSettingsResponse
}
extend type PbMutation {
updateSettings(data: PbSettingsInput): PbSettingsResponse
}
`,
resolvers: {
PbQuery: {
getSettings: resolveGetSettings(ctx => ctx.models.PbSettings)
},
PbMutation: {
updateSettings: resolveUpdateSettings(ctx => ctx.models.PbSettings)
},
PbSocialMedia: {
image({ image }) {
return image ? { __typename: "File", id: image } : null;
}
},
PbSettings: {
favicon({ favicon }) {
return favicon ? { __typename: "File", id: favicon } : null;
},
logo({ logo }) {
return logo ? { __typename: "File", id: logo } : null;
}
}
}
};
extend type Mutation {
cookiePolicy: CookiePolicyMutation
}
`,
resolvers: {
Query: {
cookiePolicy: emptyResolver
},
Mutation: {
cookiePolicy: emptyResolver
},
CookiePolicyQuery: {
getSettings: resolveGetSettings(({ models }) => models.CookiePolicySettings)
},
CookiePolicyMutation: {
updateSettings: resolveUpdateSettings(
({ models }) => models.CookiePolicySettings
)
}
}
},
security: {
shield: {
CookiePolicyMutation: {
updateSettings: hasScope("pb:settings")
}
}
}
},
{
type: "api-page-builder-model",
name: "api-page-builder-model-cookie-policy-settings",
return new ErrorResponse({
message: e.body.title,
data: {
code: e.body.status,
detail: e.body.detail,
type: e.body.type
}
});
}
return new ErrorResponse({
message: e.message
});
}
},
updateSettings: resolveUpdateSettings(({ models }) => models.MailchimpSettings)
}
}
},
security: {
shield: {
MailchimpQuery: {
getSettings: hasScope("pb:settings")
},
MailchimpMutation: {
updateSettings: hasScope("pb:settings")
}
}
}
},
{
type: "api-page-builder-model",
extend type Mutation {
googleTagManager: GtmMutation
}
`,
resolvers: {
Query: {
googleTagManager: emptyResolver
},
Mutation: {
googleTagManager: emptyResolver
},
GtmQuery: {
getSettings: resolveGetSettings(({ models }) => models.GoogleTagManagerSettings)
},
GtmMutation: {
updateSettings: resolveUpdateSettings(
({ models }) => models.GoogleTagManagerSettings
)
}
}
},
security: {
shield: {
GtmMutation: {
updateSettings: hasScope("pb:settings")
}
}
}
},
{
type: "api-page-builder-model",
name: "api-page-builder-model-google-tag-manager-settings",