The GraphQLHub
Published in

The GraphQLHub

Introducing GraphQLHub-Schemas

Use Popular APIs with GraphQL, now on NPM

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




Writing about GraphQL from

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
Clay Allsopp

Clay Allsopp

Engineering @Opendoor

More from Medium

SvelteKit doesn’t like symlinks: compare absolute paths instead of relative paths

Payload CMS Version 0.15.0 brings publishing, versions, performance, more

Guide to Monorepos: Turborepo

Why GraphCMS?