Skip to content

rbannat/gatsby-source-ttlive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-source-ttlive

This is a Gatsby source plugin that sources nodes from TT-Live.

An example site that uses this plugin can be found here: https://tt-live-scores.netlify.app/.

How to install

  1. Install dependency

    npm install --save gatsby-source-ttlive
  2. Add to gatsby-config.js

      {
          plugins: [
          `gatsby-source-ttlive`,
        ],
      }

Example query

This is an example query for loading all fixtures of a league sorted by date in descending order:

query LatestFixturesByLeagueId($leagueId: String!) {
  allFixture(
    filter: { league: { id: { eq: $leagueId } } }
    sort: { order: DESC, fields: date }
  ) {
    nodes {
      date
      link
      note
      nr
      homeTeam {
        name
      }
      guestTeam {
        name
      }
      result
    }
  }
}

About

This is a Gatsby source plugin that sources nodes from TT-Live

Resources

Stars

Watchers

Forks

Packages

No packages published