New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fpl-api-graphql

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fpl-api-graphql

A GraphQL node wrapper for the Fantasy Premier League (fantasy.premierleague.com) REST apis.

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by333.33%
Maintainers
1
Weekly downloads
 
Created
Source

fpl-api-graphql

A GraphQL node wrapper for the Fantasy Premier League (fantasy.premierleague.com) REST apis, updated for the 2019/20 season.

npm

Installation

npm install fpl-api-graphql --save

Usage

const { typeDefs, resolvers } = require('fpl-api-graphql');

The package exposes GraphQL typeDefs (a schema description as a GraphQL type language string) and resolvers.

There are no assumptions about the implementation. If serving over http the package would typically be consumed with either express-graphql or apollo-server.

Example

This example uses express-graphql to serve over http and graphql-tools to build an executable schema.

const express = require('express');
const graphqlHTTP = require('express-graphql');
const { makeExecutableSchema } = require('graphql-tools');
const { typeDefs, resolvers } = require('fpl-api-graphql');

// build executable schema from typedefs and resolvers
const schema = makeExecutableSchema({ typeDefs, resolvers });

// express app
const app = express();

// graphql
app.use(
  '/graphql',
  graphqlHTTP({
    schema,
    graphiql: true,
  }),
);

// serve
app.listen(3000, () => {
  console.log(`express-graphql demo running on port 3000`);
});

The GraphQL server will be available at http://localhost:3000/graphql and the GraphiQL IDE will also be available in the browser.

TODO

  • More documentation
  • Unit tests

Keywords

FAQs

Package last updated on 03 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc