GraphQL Schema Design for Returning Lists of Things

How to define a graphQL type and build a schema that will return an instance or collection of the same type. Dummy data const people = [ { "_id": "1", "firstName": "John", "lastName": "Masse" }, { "_id": "2", "firstName": "Joe", "lastName": "Random" }, ]; Building the Person type const Person = new GraphQLObjectType( { name: 'Person', fields: { _id: { type:…

Read More

Getting Started with ES2015

Stepping into ES2015 Here is a starter guide I had put together to help people get to know at least some of the more common constructs found in ES2015 / ES6. It references some of my favorite materials I have come across and sets up a few questions for you to…

Read More

Meteor and MongoDB: Dynamically updating properties of objects nested within an array

Before we get into some of the code we will make the following assumptions: Our document set is named Schedule We are using ES2015+ Take this example document structure: { _id: '123-456-789', ownerId: '123', schedule: [ { _id: '432-1234-12', sectionTitle: 'Section 1', }, { _id: '222-111-232', sectionTitle: 'Section 2', } ], } The following will update sectionTitle to…

Read More