@ysdn/api

1.0.14 • Public • Published

API Circle CI

An API server for grad show things.

Getting Started

If you haven't already done so, get your dev environment set up by following this guide.

This module can't be run on it's own, it's just an interface to the database. If you're developing on this module, you can run the tests by using

npm test

GraphQL

This API makes use of GraphQL, a query language developed by Facebook.

GraphQL is nice because it only returns the things you ask for, in the structure you ask for them. So responses are small (important for mobile devices) and things are always where you expect them to be.

Here's what a GraphQL query looks like

query {
  student(id: 5) {
    name,
    email,
    profilePicture(size: 300) {
      url,
      width,
      height
    },
    projects {
      title
    }
  }
}

And here's how the server would respond

{
  data: {
    student: {
      name: "Angelina Paglia",
      email: "angelena.paglia@gmail.com",
      profilePicture: {
        url: "http://assets.ysdn2016.com/picture.jpg",
        width: 300,
        height: 450
      },
      projects: [
        { title: "Alone in New York" },
        { title: "Black Sands" }
      ]
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @ysdn/api

Weekly Downloads

1

Version

1.0.14

License

MIT

Last publish

Collaborators

  • ysdn