Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

graphql-schema-flickr

2.0.0-beta.1 • Public • Published

graphql-schema-flickr

A GraphQL schema which wraps and tidies up the Flickr REST API.

Install

Npm install:

npm install graphql-schema-flickr

Yarn install:

yarn add graphql-schema-flickr

Getting started

Setup flickr api in graphql context

express with apollo-server-express

import { graphqlExpress } from 'apollo-server-express';
import { Router } from 'express';
import { FlickrSchema, resolvers, typeDefs} from 'graphql-schema-flickr';
import { makeExecutableSchema } from 'graphql-tools';
 
const router = new Router();
 
const flickr = new FlickrSchema({
  key: 'flickrapikeyxxxxxxxxxxxxxxxxxxxx',
});
 
const schema = makeExecutableSchema({
  resolvers,
  typeDefs,
});
 
router.use('/', graphqlExpress({
  context: {
    flickr,
  },
  schema,
}));
 
export { router as default };

Keywords

none

install

npm i graphql-schema-flickr

Downloadsweekly downloads

0

version

2.0.0-beta.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability