Simple demo GraphQL Server connecting to MySQL using sequelize
Assuming nodejs is installed:
npm installnpm run dev- Navigate to
localhost:4001/graphql
query {
users{
id
firstName
}
user(id:1){
firstName
}
}
nodemonis used to restart the app when any files in the directory changesexpress-graphqlservermodels/user- using sequelize to connect to mysqlschema/user_type- defining UserType GraphQLObjectType