Skip to content

gatsby source plugin to load documents from the rt firebase db

Notifications You must be signed in to change notification settings

apotox/gatsby-source-firebase-v3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gatsby Firebase Source for gatsby v3

install via NPM

npm i gatsby-source-firebase-v3

add plugin to gatsby-config with options:

{
  // point to the firebase private key downloaded
  credential: require("./firebase-service-account.json"),
  // your firebase database root url
  databaseURL: "https://<DATABASE_NAME>.<REGION>.firebasedatabase.app/",
  types:[
    {
      type: "Product",  // this will be allProduct in GraphQL query
      path: "products", // reference
    // optional
      query: ref => ref.limitToLast(10), 
      node: (node)=> node
    }
  ]
}

donate eth 💸 0x14e0e2b13814526797b6f10676d69498bcd9b411

eth address