ysdn-2016 / ysdn-2016.github.io

Grad show site for the YSDN class of 2016
http://ysdn2016.com/
3 stars 2 forks source link

Add project queries to API #25

Closed rosszurowski closed 8 years ago

rosszurowski commented 8 years ago

Make projects accessible through the API.

Once this task is done, you should be able to access project data from queries like:

query {
  student(name: "Amy Chiu") {
    name,
    email,
    projects {
      title,
      description
    }
  }
}

and

query {
  projects {
    title,
    description
  }
}

Having this done will let Nate start messing around with pulling projects into a front-end and starting on the backend for galleries.

You'll need to create a new model, and once you've defined that, you'll need to expose it through the schema, which is the publicly accessible interface. As for reference materials, check out the GraphQL docs and this tutorial to get a sense of how GraphQL works. Looking at the student model that's already there will also be helpful.

I've added some tests to the test/ folder. Just change the lines that say it.skip('..') to it('..') to enable them. Make your changes until they pass, and add any new tests that are relevant.

iamnbutler commented 8 years ago

I assume this is meant to be sprint 2. I'll mention it in the meeting before I reassign it.

rosszurowski commented 8 years ago

Made irrelevant thanks to #30