Giter VIP home page Giter VIP logo

gatsby-source-medusa_open_source's Introduction

Medusa

gatsby-source-medusa

Medusa is an open-source headless commerce engine that enables developers to create amazing digital commerce experiences. This is a Gatsby source plugin for building websites using Medusa as a data source.

Medusa is released under the MIT license. PRs welcome! Discord Chat Follow @medusajs

Note

Plugin has been moved to our monorepo, please open issues and PR's there, as this repo is no longer maintained

Quickstart

This takes you through the minimal steps to see your Medusa data in your Gatsby site's GraphiQL explorer.

1. Installation

Install the source plugin to your Gatsby project using your favorite package manager.

npm install gatsby-source-medusa
yarn add gatsby-source-medusa

2. Configuration

Add the plugin to your gatsby-config.js:

require("dotenv").config()

module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-medusa",
      options: {
        storeUrl: process.env.MEDUSA_URL,
        authToken: process.env.MEDUSA_AUTH_TOKEN //This is optional
      },
    },
    ...,
  ],
}

The plugin accepts two options storeUrl and authToken. The storeUrl option is required and should point to the server where your Medusa instance is hosted (this could be localhost:9000 in development). The authToken option is optional, and if you add it the plugin will also source orders from your store.

You should now be ready to begin querying your data

You should now be able to view your stores MedusaProducts, MedusaRegions, MedusaCollections, and MedusaOrders (if enabled) in your Gatsby site's GraphiQL explorer.

gatsby-source-medusa_open_source's People

Contributors

kasperkristensen avatar dependabot[bot] avatar

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.