How to use the @webiny/commodo-graphql.resolveUpdate 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-page-builder / src / plugins / graphql / Page.js View on Github external
publishRevision: (_: any, args: Object, ctx: Object, info: Object) => {
                args.data = { published: true };

                return resolveUpdate(pageFetcher)(_, args, ctx, info);
            },
            // Delete a revision
github webiny / webiny-js / packages / api-page-builder / src / plugins / graphql / Page.js View on Github external
// Creates a revision from the given revision
            createRevisionFrom: createRevisionFrom,
            // Updates revision
            updateRevision: resolveUpdate(pageFetcher),
            // Publish revision (must be given an exact revision ID to publish)
            publishRevision: (_: any, args: Object, ctx: Object, info: Object) => {
                args.data = { published: true };

                return resolveUpdate(pageFetcher)(_, args, ctx, info);
            },
            // Delete a revision
            deleteRevision: resolveDelete(pageFetcher),
            // Creates a new element
            createElement: resolveCreate(elementFetcher),
            // Updates an element
            updateElement: resolveUpdate(elementFetcher),
            // Deletes an element
            deleteElement: resolveDelete(elementFetcher)
        },
        PbPageSettings: {
            _empty: () => ""
        }
    }
};
github webiny / webiny-js / packages / api-page-builder / src / plugins / graphql / Page.js View on Github external
return await resolver.resolve(root, args, context, info);
            },
            oembedData: oembed
        },
        PbMutation: {
            // Creates a new page
            createPage: resolveCreate(pageFetcher),
            // Deletes the entire page
            deletePage: resolveDelete(pageFetcher),
            // Sets given page as home page.
            setHomePage,
            // Creates a revision from the given revision
            createRevisionFrom: createRevisionFrom,
            // Updates revision
            updateRevision: resolveUpdate(pageFetcher),
            // Publish revision (must be given an exact revision ID to publish)
            publishRevision: (_: any, args: Object, ctx: Object, info: Object) => {
                args.data = { published: true };

                return resolveUpdate(pageFetcher)(_, args, ctx, info);
            },
            // Delete a revision
            deleteRevision: resolveDelete(pageFetcher),
            // Creates a new element
            createElement: resolveCreate(elementFetcher),
            // Updates an element
            updateElement: resolveUpdate(elementFetcher),
            // Deletes an element
            deleteElement: resolveDelete(elementFetcher)
        },
        PbPageSettings: {
github webiny / webiny-js / packages / api-forms / src / plugins / graphql / form.js View on Github external
resolvers: {
        FormsQuery: {
            getForm: resolveGet(getForm),
            listForms,
            listPublishedForms,
            getPublishedForm
        },
        FormsMutation: {
            // Creates a new form
            createForm: resolveCreate(getForm),
            // Deletes the entire form
            deleteForm: resolveDelete(getForm),
            // Creates a revision from the given revision
            createRevisionFrom: createRevisionFrom,
            // Updates revision
            updateRevision: resolveUpdate(getForm),
            // Publish revision (must be given an exact revision ID to publish)
            publishRevision: (_: any, args: Object, ctx: Object) => {
                args.data = { published: true };

                return resolveUpdate(getForm)(_, args, ctx);
            },
            unpublishRevision: (_: any, args: Object, ctx: Object) => {
                args.data = { published: false };

                return resolveUpdate(getForm)(_, args, ctx);
            },
            // Delete a revision
            deleteRevision: resolveDelete(getForm),
            saveFormView
        }
    }
github webiny / webiny-js / packages / api-files / src / plugins / graphql.js View on Github external
files: emptyResolver
                },
                Mutation: {
                    files: emptyResolver
                },
                FilesQuery: {
                    getFile: resolveGet(getFile),
                    listFiles: listFiles,
                    listTags: listTags,
                    isInstalled
                },
                FilesMutation: {
                    uploadFile,
                    uploadFiles,
                    createFile: resolveCreate(getFile),
                    updateFile: resolveUpdate(getFile),
                    createFiles,
                    deleteFile,
                    install
                }
            }
        },
        security: {
            shield: {
                FilesQuery: {
                    getFile: hasScope("files:file:crud"),
                },
                FilesMutation: {
                    uploadFile: hasScope("files:file:crud"),
                    createFile: hasScope("files:file:crud"),
                    updateFile: hasScope("files:file:crud"),
                    deleteFile: hasScope("files:file:crud")
github webiny / webiny-js / packages / api-page-builder / src / plugins / graphql / Menu.js View on Github external
): PbMenuResponse
        
            deleteMenu(
                id: ID!
            ): PbDeleteResponse
        }
    `,
    resolvers: {
        PbQuery: {
            getMenu: resolveGet(menuFetcher),
            listMenus: resolveList(menuFetcher),
            getMenuBySlug: getMenuBySlug
        },
        PbMutation: {
            createMenu: resolveCreate(menuFetcher),
            updateMenu: resolveUpdate(menuFetcher),
            deleteMenu: resolveDelete(menuFetcher)
        }
    }
};
github webiny / webiny-js / packages / api-forms / src / plugins / graphql / form.js View on Github external
publishRevision: (_: any, args: Object, ctx: Object) => {
                args.data = { published: true };

                return resolveUpdate(getForm)(_, args, ctx);
            },
            unpublishRevision: (_: any, args: Object, ctx: Object) => {
github webiny / webiny-js / packages / api-page-builder / src / plugins / graphql / Category.js View on Github external
data: PbCategoryInput!
            ): PbCategoryResponse
        
            deleteCategory(
                id: ID!
            ): PbDeleteResponse
        }
    `,
    resolvers: {
        PbQuery: {
            getCategory: resolveGet(categoryFetcher),
            listCategories: resolveList(categoryFetcher)
        },
        PbMutation: {
            createCategory: resolveCreate(categoryFetcher),
            updateCategory: resolveUpdate(categoryFetcher),
            deleteCategory: resolveDelete(categoryFetcher)
        }
    }
};
github webiny / webiny-js / packages / api-i18n / src / plugins / graphql / I18NLocale.js View on Github external
deleteI18NLocale(
                id: ID!
            ): I18NDeleteResponse
        }
    `,
    resolvers: {
        I18NQuery: {
            getI18NLocale: resolveGet(i18NLocaleFetcher),
            listI18NLocales: resolveList(i18NLocaleFetcher),
            searchLocaleCodes,
            getI18NInformation
        },
        I18NMutation: {
            createI18NLocale: resolveCreate(i18NLocaleFetcher),
            updateI18NLocale: resolveUpdate(i18NLocaleFetcher),
            deleteI18NLocale: resolveDelete(i18NLocaleFetcher)
        }
    }
};
github webiny / webiny-js / packages / api-cms / src / plugins / graphql.js View on Github external
`,
                resolvers: {
                    Query: {
                        cmsRead: emptyResolver,
                        cmsManage: emptyResolver
                    },
                    Mutation: {
                        cmsManage: emptyResolver
                    },
                    CmsManageQuery: {
                        getContentModel: resolveGet(contentModelFetcher),
                        listContentModels: resolveList(contentModelFetcher)
                    },
                    CmsManageMutation: {
                        createContentModel: resolveCreate(contentModelFetcher),
                        updateContentModel: resolveUpdate(contentModelFetcher),
                        deleteContentModel: resolveDelete(contentModelFetcher)
                    }
                }
            };
        },
        security: {