Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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)
},
PageBuilderPageSettings: {
_empty: () => ""
}
}
};
getPage: resolveGet(pageFetcher),
listPages: listPages(pageFetcher),
listPublishedPages,
getPublishedPage,
getHomePage,
getNotFoundPage,
getErrorPage,
listElements: resolveList(elementFetcher),
searchTags: searchTags,
oembedData: oembed
},
PageBuilderMutation: {
// 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(pageFetcher),
// 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),
// Deletes the entire page
deletePage: resolveDelete(pageFetcher),
// Sets given page as home page.
setHomePage,
// Creates a revision from the given revision
createRevisionFrom: createRevisionFrom(pageFetcher),
// 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)
},
PageBuilderPageSettings: {
_empty: () => ""
}
}
};
deleteMenu(
id: ID!
): PbDeleteResponse
}
`,
resolvers: {
PbQuery: {
getMenu: resolveGet(menuFetcher),
listMenus: resolveList(menuFetcher),
getMenuBySlug: getMenuBySlug(menuFetcher)
},
PbMutation: {
createMenu: resolveCreate(menuFetcher),
updateMenu: resolveUpdate(menuFetcher),
deleteMenu: resolveDelete(menuFetcher)
}
}
};
id: ID!
): DeleteResponse
`,
queryResolvers: {
getRevision: resolveGet(revisionFetcher),
listRevisions: resolveList(revisionFetcher)
},
mutationResolvers: {
createRevisionFrom: createRevisionFrom(revisionFetcher),
updateRevision: resolveUpdate(revisionFetcher),
publishRevision: (_, args, ctx, info) => {
args.data = { published: true };
return resolveUpdate(revisionFetcher)(_, args, ctx, info);
},
deleteRevision: resolveDelete(revisionFetcher)
}
};
): RoleResponse
deleteRole(
id: ID!
): DeleteResponse
}
`,
resolvers: {
SecurityQuery: {
getRole: resolveGet(roleFetcher),
listRoles: resolveList(roleFetcher)
},
SecurityMutation: {
createRole: resolveCreate(roleFetcher),
updateRole: resolveUpdate(roleFetcher),
deleteRole: resolveDelete(roleFetcher)
}
}
};
): TagResponse
deleteTag(
id: ID!
): DeleteResponse
}
`,
resolvers: {
CmsQuery: {
getTag: resolveGet(tagFetcher),
listTags: resolveList(tagFetcher)
},
CmsMutation: {
createTag: resolveCreate(tagFetcher),
updateTag: resolveUpdate(tagFetcher),
deleteTag: resolveDelete(tagFetcher)
}
}
};
): GroupResponse
deleteGroup(
id: ID!
): DeleteResponse
}
`,
resolvers: {
SecurityQuery: {
getGroup: resolveGet(groupFetcher),
listGroups: resolveList(groupFetcher)
},
SecurityMutation: {
createGroup: resolveCreate(groupFetcher),
updateGroup: resolveUpdate(groupFetcher),
deleteGroup: resolveDelete(groupFetcher)
}
}
};
SecurityQuery: {
getCurrentUser: resolveGetCurrentSecurityUser(userFetcher),
getCurrentUserSettings: resolveGetCurrentSecurityUserSettings(userSettingsFetcher),
getUser: resolveGet(userFetcher),
listUsers: resolveList(userFetcher)
},
SecurityMutation: {
loginUser: resolveLoginSecurityUser(userFetcher),
loginUsingToken: resolveLoginUsingToken(userFetcher),
updateCurrentUser: resolveUpdateCurrentSecurityUser(userFetcher),
updateCurrentUserSettings: resolveUpdateCurrentSecurityUserSettings(
userSettingsFetcher
),
createUser: resolveCreate(userFetcher),
updateUser: resolveUpdate(userFetcher),
deleteUser: resolveDelete(userFetcher)
}
}
};
): GroupResponse
deleteGroup(
id: ID!
): DeleteResponse
}
`,
resolvers: {
SecurityQuery: {
getGroup: resolveGet(groupFetcher),
listGroups: resolveList(groupFetcher)
},
SecurityMutation: {
createGroup: resolveCreate(groupFetcher),
updateGroup: resolveUpdate(groupFetcher),
deleteGroup: resolveDelete(groupFetcher)
}
}
};