Code Monkey home page Code Monkey logo

graphql-fpl's Introduction

graphql-fpl

A GraphQL wrapper for the Fantasy Premier League API, using node and graphql-yoga. Demo

Collaborations

A special thank you to @tanayv for his collaboration to fix errors related to axios. Collaborations are happily welcomed.

FPL Rest API endpoints

Usage

  1. Download or clone this repository
git clone https://github.com/lastmaj/fpl-graphql.git
  1. Move to the project directory and install dependencies
cd fpl-graphql
npm install
  1. Start the server
npm start

The server will run at http://localhost:4000 with a graphql playground (browse docs and schema to know more about queries)

Example

2019-09-05 19_46_36-Playground - http___localhost_4000_ Aguero's live stats for the 4the gameweek. You didn't captain him did you ?

Feel free to fork ๐Ÿด

If it helps you build something awesome, let me know. Contributions are happily welcome.

graphql-fpl's People

Contributors

dependabot[bot] avatar lastmaj avatar tanayv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

graphql-fpl's Issues

Possible solution for axios/fetch not working

Hey @lastmaj,

Thank you for creating this project, it's awesome for doing a lot of different types of analyses not possible on the app/FPL website. Just saw in the Readme that axios/fetch don't seem to work. I had ran into a similar issue while working on querying the FPL API from some scripts, and I found that we just have to supply a User-Agent header in the axios request, as outlined in this answer because the reason why this is needed is unclear: https://stackoverflow.com/questions/65140822/node-fetch-help-getting-fetcherror-invalid-json-response-body-at-url-reas

Happy to open a PR to switch to using axios/fetch depending on what you prefer if you don't have the bandwidth to do it right now as well.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.