Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
app.js
package-lock.json
package.json

README.md

nestedResolvers

Run npm install then node app.js.

Sample query:

query {
  university(name: "something") {
    colleges {
      dean {
        awards
        name
      }
      notableGraduates
      numberOfStudents
    }
    cost {
      tuition
      averageBooks
      averageFinancialAid
      costOfLiving
    }
  }
}

This is meant to accompany a blog post I wrote about writing GraphQL resolvers. To keep everything simple, the "data sources" are just hardcoded values and the university's name input does not matter. This is more to show how to write functions that will correctly resolve the given schema.

You can’t perform that action at this time.