How to use the @webiny/commodo-graphql.resolveUpdateSettings function in @webiny/commodo-graphql

To help you get started, we’ve selected a few @webiny/commodo-graphql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / api-forms / src / plugins / graphql / formsSettings.js View on Github external
}
    
        extend type FormsQuery {
            getSettings: FormsSettingsResponse
        }
    
        extend type FormsMutation {
            updateSettings(data: FormsSettingsInput): FormsSettingsResponse
        }
    `,
    resolvers: {
        FormsQuery: {
            getSettings: resolveGetSettings(getFormSettings)
        },
        FormsMutation: {
            updateSettings: resolveUpdateSettings(getFormSettings)
        }
    }
};
github webiny / webiny-js / packages / api-page-builder / src / plugins / graphql / Settings.js View on Github external
}

        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;
            }
        }
    }
};
github webiny / webiny-js / packages / api-cookie-policy / src / index.js View on Github external
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",
github webiny / webiny-js / packages / api-mailchimp / src / index.js View on Github external
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",
github webiny / webiny-js / packages / api-google-tag-manager / src / index.js View on Github external
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",