Coder Social home page Coder Social logo

commerceql's Introduction

CommerceQL

CommerceQL is a minimalist eCommerce GraphQL boilerplate.

DocumentationWebsiteForum

Contents

Setup

You will need to be running the latest version of graphql-cli, prisma and have a Prisma account too.

npm install -g graphql-cli prisma
graphql create my-commerce-app --boilerplate commerceql/commerceql
cd my-commerce-app
npm run dev

Configure

The setup above should take care of configuring your ENV with your Prisma endpoint. You'll want to configure Stripe so you can begin to take payments using the checkout mutation.

Go ahead and add your STRIPE_SECRET_KEY inside .env.

⚠️ Note: This boilerplate doesn't handle auth. You'll want to protect the order/s queries.

Development

CommerceQL can be used to build a custom GraphQL backed eCommerce app, without the limitations of hosted solutions.

You can extend the CommerceQL platform by adding additional functions, types and permissions, or you can use it "as is" and start selling 💰.

Deploy

You can immediately deploy "as is" to Zeit Now using the preconfigured now.json. You'll want to add your alias to this file for easier deployment.

If you make any changes to the schema or resolvers, you'll want to run prisma deploy to update your prisma sandbox.

Usage

Once you're up and running, locally with npml run dev or deployed to now you can start to run the provided queries, mutations and subscriptions.

Sponsors

❤️ This project is sponsored by Moltin.

commerceql's People

Contributors

kuldar avatar notrab avatar renovate-bot avatar renovate[bot] avatar travis-r6s 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

commerceql's Issues

Create convertBasketToOrder subscription

The purpose of Checkout is to wrap and protect the createOrder mutation.

Once an Order is created, the subscription should handle destroying the existing Basket.

The idea of Basket and Checkout allows you to do things like get abandoned baskets. The Checkout can also have a number of payments, failed, success, refund, etc.

Paypal implementation possible?

Hey guys!

I love Stripe and have great appreciation for it being the main implementation for CommerceQL. However, I have a few clients that really want to be on this platform, but refuse to swap over from PayPal. I'm just curious if there's any advice (nothing major/extensive) on how to inject PayPal without breaking the current flow of the module, before I start making any claims to clients.

I'm new to Prisma, I've broken some things, and I just want to keep the spirit of clean architecture and minimal approach. Thank you!

CommerceQL is phenomenal, btw! Such a great/clever service.

AppSync Integration

Hi, thank you for this project and for many great video tutorials on YouTube! It is an eye-opening work for me!
I would like to use your project with AWS AppSync, which is an AWS Managed GraphQL Service to build "scalable & reliable GraphQL endpoint with Serverless".
I'm learning about it from this 3-part tutorial (Second part here).
Do you see any possibility to upgrade your project to allow such configuration? Can you give me some advice, what should be done (I'm a beginner in both graphql and appsync)? Thanks.

ordersSubscription returns error

Firstly, thanks for this boilerplate - is extremely helpful!


I have just created a project and tried running the subscriptions example in the README:

subscription {
  ordersSubscription {
    node {
      id
      email
      total
    }
    updatedFields
    previousValues {
      id
      email
      total
    }
  }
}

But it returns this error:

{
  "errors": [
    {
      "message": "Cannot read property 'args' of undefined",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "ordersSubscription"
      ]
    }
  ]
}

Could you explain what I am doing wrong here, or is it an error with the code?

Thanks!

Create Payment type

A Payment should belong to an Order.

Payment's can be successful, declined and refunded.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Preset name not found within published preset config (monorepo:angularmaterial). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Create new Basket resolver

The Basket(id: ID!) resolver must be updated to getBasket(id: ID).

The purpose of this resolver is:

  • Get Basket contents
  • Return Basket contents, ID and subTotal
  • Create an id if none is passed in

Create moltin adapter

The platform right now is totally designed to run on Graphcool but it would be super cool to provide the same GraphQL queries/mutations and handle all of the storage and processing with moltin.

Unknown argument: boilerplate

Hey,

I'm looking to get this up and running but when running

graphql create my-commerce-app --boilerplate commerceql/commerceql

I receive the following error

Unknown argument: boilerplate

And when I try running just graphql create my-commerce-app I don't have the option to select commerceql from the available boilerplates.

I'm wondering how I can fix this issue?

Thanks!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): replace dependency npm-run-all with npm-run-all2 5.0.0

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
.install/package.json
  • graphql-boilerplate-install 0.1.9
package.json
  • graphql-yoga 1.18.3
  • prisma-binding 2.3.16
  • stripe 6.36.0
  • validator 10.11.0
  • dotenv 6.2.0
  • graphql-cli 2.17.0
  • husky 1.3.1
  • nodemon 1.19.4
  • npm-run-all 4.1.5
  • prettier 1.19.1
  • pretty-quick 1.11.1
  • prisma 1.34.12

  • Check this box to trigger a request for Renovate to run again on this repository

Create abandoned orders query

It should be possible to query for abandoned orders.

An abandoned order is an Order that has no payments associated.

This is useful for the Dashboard app.

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.