Here is a simple scenario
I want to query GraphQL and fetch all the students that have attended school more then 200 days this year.
I have a Student sequelize model, a matching GraphQL Object, a students Query which accepts the days int as an argument { students(days:200) }
What I'm obviously trying to do is to implement the logic "get all students where school_visits counter is greater than 200" just as an example...
I'm using graphql-sequelize to glue between sequelize and GraphQL.
a simple example query definition looks like this:
students: {
type: new GraphQLList(Student),
args:{
id : {type:GraphQLInt},
days: {type:GraphQLInt}
},
resolve: resolver(models.Student)
}
as you can notice, this structure doesn't allow me to insert some logic to the query...
If you had any experience working with GraphQl and Sequelize - this is a very generic situation... I'd appreciate any help resolving it.
Cheers
Ajar