Rick and Morty Graphql App

Getting started

Easily build and start the API using docker-compose file and make commands

make run-api 

You should able to see the GraphQL playground at http://localhost:8080 in your browser.

To test manually using the GraphQL Playground, you can use the queries in the tests or as outlined below:

query Characters {
 characters(filter: {name: "rick"}, first: 2) {
   count
   edges {
     node {
       id
       name
       status
       species
       gender
     }
   }
   pageInfo {
     endCursor
     hasPreviousPage
     hasNextPage
   }
 }
}

Development

Use Poetry to install all dependencies with:

poetry install

Enter the poetry virtual env with:

poetry shell

To set up the git hook scripts run:

pre-commit install

You should able to see the GraphQL playground at http://localhost:8000\ in your browser.

Testing

You can run the tests that are define in tests\ with:

pytest

or if you want some additional infos regarding coverage, run

make tests