surfline-accuracy-tracker

command module
v0.0.0-...-542a7aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 9 Imported by: 0

README

surfline-accuracy-tracker

About

This is a small GraphQL project to track the accuracy of surfline.com's surf reports.

Local Setup

Use go 1.20 and go mod download to fetch dependencies.

You can use docker-compose to run a local psql instance, first copy .env.example to .env and fill it out, and then run docker-compose up

You must also manually setup the postgres schema for the time being, see local/postgres/schema.sql for the DDLs to run

Finally, run go run ./server.go to bring up the server.

Example Queries

query getSiteReports {
  siteReports{
    email
    surflineSite {
      name
      url
    }
  }
}

query getSurflineSites {
  surflineSites{
    name
    url
  }
}

Example Mutations

mutation createSiteReport {
  createSiteReport(input:{
    email:"vijay.krishna.ramesh@gmail.com"
    surflineSiteId:1
    surflineRating: FAIR
    siteReportRating:GOOD
    accuracyEstimate:MEDIUM
    timestamp: 1688324044 
  }){
    timestamp
  }
}

Tests

Run go test ./... to run all tests.

Contributing

Contributions are welcome, please fork and submit a PR. Please follow the existing code style and conventions.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
graph
common
@/graph/common/context.go
@/graph/common/context.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL