Code Monkey home page Code Monkey logo

sws-graphql's Introduction

UW Student Web Service GraphQL Inteface

This is a work in progress GraphQL interface for UW SWS REST API. Currently supports: Term, Curriculum, Course and Section public resources (access token required).

Installation

Requires an access token from UW Enterprise Web Services Team; UWNetID required. SWS Wiki

Docker Compose

sws-graphql:
  image: gvnmccld/sws-graphql
  environment:
    - CONFIGFILE=/config/config.env
  volumes:
    - /path/to/config-folder:/config
  ports:
    - "3009:3009"

Docker Run

docker run -d --name="sws-graphql" -v /path/to/config-folder:/config -p "3009:3009" gvnmccld/sws-graphql

Cloning Repo

Config

Application expects a config.env file (see config.env.example) in /path/to/config-folder or in the application root. A valid token from SWS support is required to make calls to the public APIs. See the SWS Wiki for more information.

Sample Query - Get Current Term

{
  GetTermCurrent {
    Year
    Quarter
    AcademicCatalog
    CensusDay
  }
}

Persisted Queries (Work in Progress)

Ability to persist queries to a data store, optionally with variables, and execute them via a POST. Example code is storing in a .json file but could easily be remixed to store anywhere.

Routes

  • POST /query/new -> save a new query
  • POST /query/:id -> Execute a persisted query
  • PUT /query/:id -> Update existing query
  • GET /query/:id -> Get query by ID
  • GET /queries -> Get all queries
  • GET /queries/:username -> Get all queries by username
  • DELETE /query/:id -> Delete query by ID

Sample Persisted Query

POST /query/1
{
  "variables": { "year": 2017, "quarter": "spring" }
}

sws-graphql's People

Contributors

cannoc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.