- Fork & clone this repo
- Run
bundle install
to install gem packages - Run
rails db:{drop,create,migrate,seed}
to set up Database - Run
bundle exec figaro install
then add your API keys to theconfig/application.yml
file as:NEWS_API_KEY
for the Newsapi.org APIcongress_api
for the Propublica APIgoogle_api
for the Google Civics API
- Run
rails s
and navigate to localhost:3000 to connect to the Endpoints
Receive endpoints from POST localhost:3000/graphql
{
users{
name
id
}
}
mutation {
createUser(input:{
name: "Bob"
email: "[email protected]"
}) {
user{
name
email
}
}
}
mutation {
userUpdate(input:{
id: 2,
name: "Colin"
}) {
user{
name
email
}
}
}
mutation {
userDelete(input:{
id: "41"
}) {
user{
name
email
}
}
}
{
stories (name: "Gun Violence") {
date
title
content
author
description
img
url
}
}
{
representatives (address: "80223") {
name
emails
address
party
phones
office
}
}