Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (parentEntity) {
parentEntity.menuitemIds.push(entity.id);
}
return entity;
},
},
};
const schema = makeExecutableSchema({
typeDefs: [QuerySchema, MutationSchema, MenuSchema, MenuItemSchema],
resolvers,
});
const graphQLOptions = { schema };
server.post('/graphql', graphqlRestify(graphQLOptions));
server.get('/graphql', graphqlRestify(graphQLOptions));
}
const parentEntity = menus.find(tmp => parseInt(menuId, 10) === parseInt(tmp.id, 10));
if (parentEntity) {
parentEntity.menuitemIds.push(entity.id);
}
return entity;
},
},
};
const schema = makeExecutableSchema({
typeDefs: [QuerySchema, MutationSchema, MenuSchema, MenuItemSchema],
resolvers,
});
const graphQLOptions = { schema };
server.post('/graphql', graphqlRestify(graphQLOptions));
server.get('/graphql', graphqlRestify(graphQLOptions));
}