a1b84c219afbc5e0ba76a221cde2f324a22ef3e6
ModuleUsers
Known Improvements
- Remove the relationship to users, since it is not needed.
const RoleType = new GraphQLObjectType({ name: 'Role', fields: () => ({ id: { type: GraphQLID}, name: {type: GraphQLString}, users: { type: new GraphQLList(UserType), resolve(parent, args) { return User.find({roleId: parent.id}); } } }) });
- Roles should be an Enum Type.
Since roles just have a name field, I think we should use the ENUM type... https://graphql.org/learn/schema/#enumeration-types They would just be resolved in Mongoose/MongoDB as strings and we would validate specifcially to those strings. Unless there's going to be many types of roles in the future.
Description
Free, open-source crypto trading bot, automated bitcoin / cryptocurrency trading software, algorithmic trading bots. Visually design your crypto trading bot, leveraging an integrated charting system, data-mining, backtesting, paper trading, and multi-server crypto bot deployments.
https://www.superalgos.org
1,002 MiB
0 Stars
1 Watchers
0 Forks
Languages
JavaScript
52%
PostScript
47.6%
CSS
0.3%