Introducing GraphQLHub-Schemas

Use Popular APIs with GraphQL, now on NPM

Clay Allsopp
Mar 11, 2016 · 1 min read
Logo by Nate Murray!

I started GraphQLHub because people wanted to learn about GraphQL and Relay without needing their own server. The project has been open-source almost from the get-go, but using the GraphQLHub code on your own wasn’t really possible — until now!

The GraphQLHub-Schemas NPM package contains the GraphQL code to connect to Reddit, Twitter, Github, and more. Here’s how you can use it:

$ npm i graphql graphqlhub-schemas --saveimport { Reddit } from 'graphqlhub-schemas';
import { GraphQLSchema, graphql } from 'graphql';

let schema = new GraphQLSchema({
query: Reddit.QueryObjectType

let query = ' { user(username: "kn0thing") { username } } ';
graphql(schema, query).then((result) => {

And if you want to explore the schemas right now, you can always use GraphQLHub. If you have feature requests or run into problems, don’t be afraid to drop an issue on Github.

GraphQLHub has seen awesome community contributions over the past few months and I’m excited to see it grow.

Publishing the schemas on NPM is a great step in making GraphQL more accessible — and there’s more to come :)

To stay updated on GraphQL and GraphQLHub, follow @GraphQLHub on Twitter or my posts here on Medium

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store