maxcell / graphql-dex

1 stars 0 forks source link

Added resolvers to get a pokemon, and a pokemon by types for #6. #10

Closed AdamMc331 closed 5 years ago

AdamMc331 commented 5 years ago

I moved the pokemon resolver into its own file and left the other queries into schema.js.

One thing I don't like here is that both import knex, and do their setup. Maybe we should abstract the knex stuff out into its own file, and have the resolvers request data from it and so the resolvers don't have to know that we're using knex? That way if we ever want to swap it out we can do so easily without changing all the resolvers.

That could still be a ticket for later tho.